|
Post by da on Mar 13, 2012 6:08:38 GMT -5
Hi, I'm a fan, I tried to register but was not able to do so. I posted about that in the general section. I would like to know how to circumvent the fact that when I add an object to the pong screen, for example a text box or something else the isKeyPressed stops working. From what I can tell the "focus" (from my vb6 days) is set on the text box and so the main screen no longer is picking up input. I would like to have several added things to the screen so I'm curious how I could fix this. Even a simple game like pong should have a score box and stuff, but I'm working on a slightly more complicated game and I would appreciate some help Ashley. -da
|
|
|
Post by Ashley on Mar 13, 2012 17:42:48 GMT -5
Well I havent checked this out myself, but it seems that the textbox is waiting for input and is overriding the isKeyPressed method.. I will try and have a look into ways around this, however the only alternative i can think of is to use labels instead of textboxes.
Hope that helps Ashley
|
|
|
Post by da on Mar 13, 2012 23:22:13 GMT -5
i ended up using
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
i found this solution online using google.
|
|
|
Post by Ashley on Mar 14, 2012 18:42:19 GMT -5
Good, glad you got it working
|
|