How do i keep a window on top constantly in vb???
Printable View
How do i keep a window on top constantly in vb???
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
Const SWP_NOMOVE = 2
Const SWP_NOSIZE = 1
Const FLAGS = SWP_NOMOVE Or SWP_NOSIZE
Const HWND_TOPMOST = -1
Dim OnTop As Long
OnTop = SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, 0, 0, FLAGS)
This 'll keep ALLWAYS on TOP!
Be care in his use!!!
Boa sorte! (It's portuguese not spanish)
Jefferson
Just a warning, Test that first and then disable it while working on the project. If a Message pops up, you cant get to it!