|
-
October 23rd, 1999, 10:50 PM
#1
Always On Top
Does anyone know how to make a VB form - Always On Top ? (with VB coding, please ...)
-
October 24th, 1999, 04:46 AM
#2
Re: Always On Top
This should be placed in the module:
code:
--------------------------------------------------------------------------------
Declare Function SetWindowPos Lib "user32" Alias "SetWindowPos" (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
Const conHwndTopmost = -1
Const conHwndNoTopmost = -2
Const conSwpNoActivate = &H10
Const conSwpShowWindow = &H40
--------------------------------------------------------------------------------
Use this in the event you want to set it topmost:
code:
--------------------------------------------------------------------------------
SetWindowPos hWnd, conHwndTopmost, 0, 0, 0, 0, conSwpNoActivate Or conSwpShowWindow
SetWindowPos hWnd, conHwndNoTopmost, 0, 0, 0, 0, conSwpNoActivate Or conSwpShowWindow
[email protected]
http://smalig.tripod.com
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
|