As the tittle says i will explain how to make the window allways on top.
Put that in a module
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
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
Now Put that 2 functions:
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
And finally if u want to make it on top/or not:
MakeWindowAlwaysTop (hWnd) 'TO MAKE IT ON TOP
MakeWindowNotTop (hWnd) 'NOT ON TOP
Or with HOTKEYS:
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
can you make a hot key for it?
for example
press Insert to bring the hack to the front
press delete to minimize it.
Originally Posted by icuigorz
can you make a hot key for it?
for example
press Insert to bring the hack to the front
press delete to minimize it.