Make a form stay on top.
Make a form stay on top.
API Declarations
Global Const conHwndTopmost = -1
Global Const conHwndNoTopmost = -2
Global Const conSwpNoActivate = &H10
Global Const conSwpShowWindow = &H40
Rate Make a form stay on top.
(1(1 Vote))
'You must make a menu and call it mnuStayOnTop.
'However, the menu does not have to be visible.
'You can change the 0, 0, 205, 141, to whatever you like.
'0, 0, is top left corner of the screen.
If mnuStayOnTop.Enabled = True Then
SetWindowPos hwnd, conHwndTopmost, 0, 0, 205, 141, conSwpNoActivate Or conSwpShowWindow
Else
mnuStayOnTop.Enabled = False
SetWindowPos hwnd, conHwndNoTopmost, 100, 100, 205, 141, conSwpNoActivate Or conSwpShowWindow
End If
Make a form stay on top. Comments
No comments yet — be the first to post one!
Post a Comment