|
-
January 27th, 2000, 02:59 PM
#1
ontop
hello!!
how can my program be always ontop.
-
January 27th, 2000, 03:17 PM
#2
Re: ontop
1) Make 2 command buttons (Command1, Command2)
place this code into form
private Declare Function SetWindowPos Lib "user32" (byval h%, byval hb%, byval X%, byval Y%, byval cx%, byval cy%, byval F%) as Integer
Const flags = SWP_NOMOVE Or SWP_NOSIZE
Const SWP_NOMOVE = 2
Const SWP_NOSIZE = 1
Const HWND_TOPMOST = -1
Const HWND_NOTOPMOST = -2
private Sub Command1_Click()
SetWindowPos me.hWnd, HWND_TOPMOST, 0, 0, 0, 0, flags
End Sub
private Sub Command2_Click()
SetWindowPos me.hWnd, HWND_NOTOPMOST, 0, 0, 0, 0, flags
End Sub
Clicking Command1 will activate "on top"
Clicking Command2 will remove "on top"
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
|