receiving keystrokes even if the activewindow isn't the form??

frix199

Member
Joined
Jul 18, 2005
Messages
19
Programming Experience
1-3
hi there, this is my first post and i want 2 ask sumthing...
when i use this code:
VB.NET:
	Private Sub form1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles form1.KeyPress
		If e.KeyChar = "o" Then
			SendKeys.Send("asbanda")
		End If
	End Sub
it sends the keys "asbanda" only if i press "o" with active window the form....

how can i fix that??( like when i'm playing need for speed underground and i press "o" the keys "asbanda" are sended)

help plzz
 
There is no actual "fix" for that because that is the way it is supposed to be. I'd say that you'll have to override the WndProc method and catch the Windows messages. Good luck. :)
 
Back
Top