Movecontrol




Declare Function SetWindowPos% Lib "user32" (ByVal h%, ByVal hb%, ByVal x%,
ByVal y%, ByVal cx%, ByVal cy%, ByVal f%)
Const SWP_NOMOVE = 2
Const SWP_NOSIZE = 1
Const FLAGS = SWP_NOMOVE Or SWP_NOSIZE
Const HWND_TOPMOST = -1
Const HWND_NOTOPMOST = -2
' Add the following code to the appropriate event:

' Set TopMost

Dim success%
success% = SetWindowPos%(Form1.hWnd, HWND_TOPMOST, 0, 0, 0, 0, Flags)
' Remove TopMost

Dim success%
success% = SetWindowPos%(Form1.hWnd, HWND_NOTOPMOST, 0, 0, 0, 0,Flags)










( movecontrol.html )- by Paolo Puglisi - Modifica del 17/12/2023