maybe i just turn to use keyup and keydown =.=
but i just find out that keyup/keydown need an object ( like textbox1 etc)
to process
how can i use keyup/keydown like 'Overrides' event?
(I just want to move a picturebox via keyboard ....like a real game
i really tried searching the web for game code but nothing help = =
could u please show me some example?)
Thanks for your replys.....thou ght...
User Profile
Collapse
-
I have tried debugging
i checked the value but there would be a problem
I need to 'release' the button ( you cannot hold a keyboeard button while you move your mouse to check the code....)
so....
i think there is no way to test the WM_KeyUp..i think
(The value of WM_KeyUP at there while i release the button is 256 , whiich is definetly the value of the WM_KeyDomn if i set the breakpoint at there = =)...Leave a comment:
-
Help - KeyUp doesn't seem to be responding
Please take a look at my code....
Code:Const WM_KEYDOWN As Integer = &H100 Const WM_SYSKEYDOWN As Integer = &H104 Const WM_KEYUP As Integer = &H101 Const WM_SYSKEYUP As Integer = &H105 Protected Overrides Function ProcessCmdKey(ByRef msg As Message, ByVal keyData As Keys) As Boolean Dim XLocation As Integer = PictureBox2.Location.X
Last edited by Killer42; Feb 12 '07, 02:22 AM. Reason: Please use CODE tags around your program code. -
Thanks a lot ^^
however i am using visual basic .net...
it seems that i cannot use ' vbkeydown' or ' vbkeyup'....Leave a comment:
-
Hi all ~! I have a question about time delay....
Hi all~
I would like to ask
I am doing a game project and i have to control a picturebox to move by pushing a Key (e.g. Keys.up)
i used PerformClick() but there is a key delay( abt 1 sec...when you press the key, it waited abt 1 sec before it make continous movement)
i want the picturebox move smoothly as i press the key
How can i cancel the time delay?
Thanks
No activity results to display
Show More
Leave a comment: