|
-
Jan 2nd, 2000, 06:13 PM
#1
Thread Starter
Junior Member
Does anyone know a GOOD always on top code?
------------------
Doomstar
http://come.to/Doomstar
-
Jan 2nd, 2000, 07:49 PM
#2
Member
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>
-
Jan 2nd, 2000, 07:49 PM
#3
Junior Member
Try this, it's from the project I am currently working at:
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
Regards,
Frank
-
Jan 6th, 2000, 04:01 AM
#4
Thread Starter
Junior Member
Thanks Frankiz, it worked!
ps. Good luck with your project
------------------
Doomstar
http://come.to/Doomstar
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|