Does anyone know a GOOD always on top code?
------------------
Doomstar
http://come.to/Doomstar
Printable View
Does anyone know a GOOD always on top code?
------------------
Doomstar
http://come.to/Doomstar
Hi !
What does GOOD mean ?
I know something like:
SetWindowPos(Me.hWnd, HWND_TOPMOST, 0,0, 100, 100, SWP_SHOWWINDOW)
Add the declaration of the API function and it should work.
Björn
------------------
EMAIL: [email protected]
PAGE: <A HREF="http://members.xoom.com/sharetools
" TARGET=_blank>http://members.xoom.com/sharetools
</A>
Try this, it's from the project I am currently working at:
Regards,Code:
Const SWP_NOMOVE = 2
Const SWP_NOSIZE = 1
Const FLAGS = SWP_NOMOVE Or SWP_NOSIZE
Const HWND_TOPMOST = -1
Const HWND_NOTOPMOST = -2
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
Private Sub SetAlwaysOnTop()
Dim Temp as variant
Temp = SetWindowPos(Me.hwnd, HWND_TOPMOST, 0, 0, 0, 0, FLAGS)
End Sub
Private Sub NoAlwaysOnTop()
Dim Temp as variant
Temp = SetWindowPos(Me.hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, FLAGS)
end sub
Frank
Thanks Frankiz, it worked!
ps. Good luck with your project
------------------
Doomstar
http://come.to/Doomstar