VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Keep a form on top

Dennis Wrenn  (2 Submissions)   Miscellaneous   Visual Basic 3.0   Beginner   Wed 3rd February 2021

This code keeps a form on top of all other windows.

API Declarations
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 HWND_TOPMOST = -1
Private Const HWND_NOTOPMOST = -2
Private Const SWP_NOMOVE = &H2
Private Const SWP_NOSIZE = &H1
Private Const SWP_FLAGS = SWP_NOMOVE Or SWP_NOSIZE

Rate Keep a form on top (2(2 Vote))
Keep a form on top.bas

Keep a form on top Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters