by kukuruza (1 Submission)
Category: Custom Controls/Forms/Menus
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Mon 6th August 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Puts a form on top of other forms and vice versa...
API Declarations
Public Const HWND_TOPMOST = -1
Public Const HWND_NOTOPMOST = -2
Public Const SWP_NOMOVE = &H2
Public Const SWP_NOSIZE = &H1
Public Const FLAGS = SWP_NOMOVE Or SWP_NOSIZE
SetWindowPos Me.hWnd, HWND_TOPMOST, 0&, 0&, 0&, 0&, FLAGS
'makes window not on top of other windows
SetWindowPos Me.hWnd, HWND_NOTOPMOST, 0&, 0&, 0&, 0&, FLAGS
'something funny to do(first look at it then try it!!!):
'Me.WindowState = 2
'Me.BorderStyle = 0
'do
' SetWindowPos Me.hWnd, HWND_TOPMOST, 0&, 0&, 0&, 0&, FLAGS
'loop while 0=0