condor01 (11-05-2007),icuigorz (11-05-2007),Jumpshot (11-05-2007),SATANICAT (11-05-2007),wilson945766 (12-17-2011),___x][GooD. (12-08-2010)
As the tittle says i will explain how to make the window allways on top.
Put that in a module
Now in ur Form declarationsDeclare 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
Now Put that 2 functions:Private Const HWND_BOTTOM = 1
Private Const HWND_NOTOPMOST = -2
Private Const HWND_TOP = 0
Private Const HWND_TOPMOST = -1
Private Const SWP_NOMOVE = &H2
Private Const SWP_NOSIZE = &H1
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
And finally if u want to make it on top/or not:Public Sub MakeWindowAlwaysTop(hWnd As Long)
SetWindowPos hWnd, HWND_TOPMOST, 0, 0, 0, 0, _
SWP_NOMOVE + SWP_NOSIZE
Form1.Visible = True
End Sub
Public Sub MakeWindowNotTop(hWnd As Long)
SetWindowPos hWnd, HWND_NOTOPMOST, 0, 0, 0, 0, _
SWP_NOMOVE + SWP_NOSIZE
Form1.Visible = False
End Sub
Or with HOTKEYS:MakeWindowAlwaysTop (hWnd) 'TO MAKE IT ON TOP
MakeWindowNotTop (hWnd) 'NOT ON TOP
Private Sub Timer1_Timer()
If GetAsyncKeyState(vbKeyQ) <> 0 Then 'OR UR KEY
MakeWindowAlwaysTop (hWnd)
form1.visible=true
ElseIf GetAsyncKeyState(vbKeyW) <> 0 Then 'OR UR KEY
MakeWindowNotTop (hWnd)
Form1.visible=false
End If
End Sub
Last edited by blipi; 11-05-2007 at 12:34 PM.
condor01 (11-05-2007),icuigorz (11-05-2007),Jumpshot (11-05-2007),SATANICAT (11-05-2007),wilson945766 (12-17-2011),___x][GooD. (12-08-2010)
can you make a hot key for it?
for example
press Insert to bring the hack to the front
press delete to minimize it.
icuigorz (11-05-2007)
I've been looking for something like this!
[IMG]https://i12.photobucke*****m/albums/a219/cowfurmoo/SATNICAT.jpg[/IMG]
www.SATANICA*****m
Can't you tell I made it in paint?
[IMG]https://i12.photobucke*****m/albums/a219/cowfurmoo/631184778462.png[/IMG]
^If you want to join the SATANICAT union add this to your signature. ^
Take the Magic: The Gathering 'What Color Are You?' Quiz.
Support me https://www.SATANICA*****m