Keep a window always on top of other To keep your form always on top call the SetWindowOnTop Me, Tr
Keep a window always on top of other To keep your form always on top call the SetWindowOnTop Me, True and to deactivate the always on top of
API Declarations
Private Const HWND_NOTOPMOST = -2
Private Const SWP_NOACTIVATE = &H10
Private Const SWP_SHOWWINDOW = &H40
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
Rate Keep a window always on top of other To keep your form always on top call the SetWindowOnTop Me, Tr
(1(1 Vote))
Dim iFlag As Long
iFlag = IIf(bAlwaysOnTop, HWND_TOPMOST, HWND_NOTOPMOST)
SetWindowPos f.hwnd, iFlag, f.Left / Screen.TwipsPerPixelX, f.Top / Screen.TwipsPerPixelY, _
f.Width / Screen.TwipsPerPixelX, f.Height / Screen.TwipsPerPixelY, SWP_NOACTIVATE Or SWP_SHOWWINDOW
End Sub
Keep a window always on top of other To keep your form always on top call the SetWindowOnTop Me, Tr Comments
No comments yet — be the first to post one!
Post a Comment