 |
 |

01-23-2004, 03:57 AM
|
|
Centurion
|
|
Join Date: Jan 2004
Posts: 159
|
|
Most reliable way to handle keyboard input?
|
I've been using DirectX 7 Direct Input for keyboard polling, but for some reason every once in a while when I run the program the keys are NOT recongnized. I have to re-start VB and then run the app again and all is fine.
I'm considering switching over to GetAsyncKeyState for all of my keyboard handling. I've used this reliably in the past. Is there any benefit to using Direct Input over the GetAsyncKeyState api?
Also, could the GetAsyncKeyState api AND DirectX Input for Joystick reading work at the same time? Thanks...
|
|

01-24-2004, 07:03 AM
|
|
Centurion
|
|
Join Date: Mar 2003
Posts: 115
|
|
You could use DirectInput from directX. This is a mediocore to good way of handling keyboard inputs. Takes a lot of work, but is more or less reliable!
http://www.directx4vb.com/ has a tutorial on it
|
|

01-25-2004, 10:05 PM
|
|
Centurion
|
|
Join Date: Jan 2004
Posts: 159
|
|
"I've been using DirectX 7 Direct Input for keyboard polling, but for some .... " 
|
|

01-26-2004, 02:17 AM
|
|
Centurion
|
|
Join Date: Mar 2003
Posts: 115
|
|
|
Sowwy... then I can't help you
|
|

01-26-2004, 10:43 AM
|
|
Centurion
|
|
Join Date: Jan 2004
Posts: 159
|
|
Quote: Originally Posted by joon Sowwy... then I can't help you
Hey Joon, no prob. The "problem" seems to only happen in the editor, it hasn't happened to any exe I've made. So, perhaps it's not that big of a deal. Plus after a few uh.. "crashes" I have to reboot VB because everything kind of breaks down. 
|
|

01-26-2004, 07:13 PM
|
 |
Mostly Absent
* Expert *
|
|
Join Date: Jun 2002
Location: Christchurch, New Zealand
Posts: 2,006
|
|
|
Sounds like you might have a memory leak or something. Are you making sure to set all your objects = Nothing and unload everything when you're done?
|
__________________
Sometimes it happens feelings die, Whole years are lost in the blink of an eye
We once had it all but event conspired, Sometimes
Now that it's over, it is through, It gets me everytime I think of you
Sometimes It happens, feelings die, Sometimes
|

01-27-2004, 05:14 AM
|
|
Centurion
|
|
Join Date: Jan 2004
Posts: 159
|
|
Quote: Originally Posted by JimCamel Sounds like you might have a memory leak or something. Are you making sure to set all your objects = Nothing and unload everything when you're done?
Yep. Thanks for asking, as that is a good point. I've been modifying my engine by the hour, the more I update, the better everything is working and the less overall problems. The keyboard problem hasn't happened for quite a while so I'm going to stick with DI for the keyboard. 
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|
|
|
 |
|