form over any window?

beboson
09-01-2003, 11:03 PM
is it possible to keep like a tiny form on top of a games, etc window?

gundavarapu
09-01-2003, 11:33 PM
You can make the for Topmost. It'll be on top of everything on the screen untill, the window is minimized or another topmost form invoked after this covers it.

To make your form topmost, try this code...


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

Const conHwndTopmost = -1
Const conHwndNoTopmost = -2
Const conSwpNoActivate = &H10
Const conSwpShowWindow = &H40


Private Sub Form_Load()
SetWindowPos hwnd, conHwndTopmost, 100, 100, 205, 141, conSwpNoActivate Or conSwpShowWindow
End Sub


Hope this helps!

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum