Private Declare Function SetWindowPos Lib "user32" (ByVal _
hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As _
Long, ByVal y As Long, ByVal cx As Long, ByVal cy As _
Long, ByVal wFlags As Long) As Long
Private Const SWP_NOMOVE = &H2
Private Const SWP_NOSIZE = &H1
Private Const HWND_BOTTOM = 1
Private Const HWND_TOP = 0
Private Sub cmdSendToBack_Click()
Dim flags As Long
flags = SWP_NOSIZE Or SWP_NOMOVE
SetWindowPos Me.hwnd, HWND_BOTTOM, 0, 0, 0, 0, flags
End Sub
Private Sub cmdBringToFront_Click()
Dim flags As Long
flags = SWP_NOSIZE Or SWP_NOMOVE
SetWindowPos Me.hwnd, HWND_TOP, 0, 0, 0, 0, flags
End Sub
|