'

' OnTheTop

Private Sub Command1_Click()

NapraviTop Me.hwnd ' Me.hwnd, OnTheTop

End Sub

 

' NotOnTheTop

Private Sub Command2_Click()

NotTop Me.hwnd ' Me.hwnd, NotOnTheTop

End Sub

 

' OnTheTop

Private Sub Form_Load()

NapraviTop Me.hwnd

End Sub

 

'

 

' ( )

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

 

' , () On the top

Public Sub NapraviTop(hwnd As Long)

SetWindowPos hwnd, -1, 0, 0, 0, 0, &H2 + &H1

End Sub

 

' , On the top ()

Public Sub NotTop(hwnd As Long)

SetWindowPos hwnd, -2, 0, 0, 0, 0, &H2 + &H1

End Sub