by Deano Splamoni (15 Submissions)
Category: Custom Controls/Forms/Menus
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Sat 14th August 2004
Date Added: Mon 8th February 2021
Rating:
(1 Votes)
This keeps the form on top of all others except the start menu as there isnt a way to bypass that. i have submitted this as the old one was
API Declarations
Const HWND_TOPMOST = -1
Const HWND_NOTOPMOST = -2
Const SWP_NOMOVE As Long = &H2
Const SWP_NOSIZE As Long = &H1
Public Sub MakeAlwaysOnTop(TheForm As Form, SetOnTop As Boolean)
Dim lflag
If SetOnTop Then
lflag = HWND_TOPMOST
Else
lflag = HWND_NOTOPMOST
End If
SetWindowPos TheForm.hwnd, lflag, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE
End Sub
'Deano Splamoni
'Antbyte Software 2001-2004
'http://abs.watp.ircjunx.com/
No comments have been posted about This keeps the form on top of all others except the start menu as there isnt a way to bypass that. . Why not be the first to post a comment about This keeps the form on top of all others except the start menu as there isnt a way to bypass that. .