rbgCODE Regular
Joined: 11 Nov 2004 Posts: 54 Location: Manchester CT
|
Posted: Jun 17th, 2005 12:17 PM Post subject: |
|
|
| Code: |
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
Public Sub FormOnTop(hWindow As Long, bTopMost As Boolean)
Const SWP_NOSIZE = &H1
Const SWP_NOMOVE = &H2
Const SWP_NOACTIVATE = &H10
Const SWP_SHOWWINDOW = &H40
Const HWND_TOPMOST = -1
Const HWND_NOTOPMOST = -2
wFlags = SWP_NOMOVE Or SWP_NOSIZE Or SWP_SHOWWINDOW Or SWP_NOACTIVATE
Select Case bTopMost
Case True: Placement = HWND_TOPMOST
Case False: Placement = HWND_NOTOPMOST
End Select
SetWindowPos hWindow, Placement, 0, 0, 0, 0, wFlags
End Sub
|
_________________ '><>
'rBg
'><> |
|