You are right, DataMiser, but lets get to the top - or no, to the bottom of it:
Code:
Public Declare Function SetWindowPos Lib "user32" ( _
ByVal hWnd As Long, _
ByVal hWia As Long, _
ByVal X As Long, ByVal Y As Long, _
ByVal cx As Long, ByVal cy As Long, _
ByVal wFlags As Long _
) As Long
Public Const SWP_NoSize = 1&
Public Const SWP_NoMove = 2&
Public Const SWP_NoZOrder = 4&
Public Const SWP_NoOwnerZOrder = &H200
Public Const SWP_FrameChanged = &H20
Public Const HWND_Top = 0&
Public Const HWND_Bottom = 1&
Public Const HWND_TopMost = -1&
Public Const HWND_NoTopMost = -2&
To make a form named "Form1" float on top of all other open forms you'd make a call like
Code:
SetWindowPos Form1.hWnd, HWND_TopMost, 0, 0, 0, 0, SWP_NoMove Or SWP_NoSize
Bookmarks