So, I'm able to hide the applicatin when you click on the close button. However, I want the users to be able to put the prgram in Stealth Mode with combination Key Pressed. I made a function that is able to regonize multiple key strokes and worked with this test program. However, I implemeded the same code to Prankzter and it won't work.
Here's the routine:
CODE
Private Declare Function GetAsyncKeyState Lib "user32.dll" (ByVal keyCode As Integer) As Short
Public Sub HotKeyPressed(ByVal Action as String, ByVal key1 As Integer, ByVal key2 As Integer)
If GetAsyncKeyState(key1) And GetAsyncKeyState(key2) Then
If Action = "show" Then
form1.show()
End If
If Action = "hide" Then
form1.hide()
End If
End If
End Sub
I had the function say label1.text = "F**k you" so i changed it to suite what I wanted it to do. So, it wasn't working so that's then changed the function to see if it was capturing key strokes. But appearently it hasn't.
I pujt it in the Form1_KeyDown and tried it in various ways in Form1_KeyUp then Form1_KeyPress but neither worked. I noticed that one of the Radio buttons on focus but I don't know if that has to do with anything detecting key strokes.
Any suggestions?
Thanks!
I don't understand why it worked in the example test and won't work in this app. Also inside the Form1_KeyDown:
CODE
HotKeyPressed(Keys.ControlKey, Keys.S)
Thanks again!
-Paul