|
-
January 14th, 2000, 03:39 PM
#1
Always on top
Is there a way to make a vb app always stay on top, regardless of the active window. An example would be the task manager window.
-
January 14th, 2000, 04:04 PM
#2
Re: Always on top
make a command button and 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 SWP_NOMOVE = 2
Const SWP_NOSIZE = 1
Const flags = SWP_NOMOVE Or SWP_NOSIZE
Const HWND_TOPMOST = -1
private Sub Command1_Click()
SetWindowPos me.hWnd, HWND_TOPMOST, 0, 0, 0, 0, flags
End Sub
Good luck!
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
|