Text Boxes and Game

binderben

Member
Joined
Sep 22, 2005
Messages
7
Programming Experience
Beginner
Hi everyone,

I am making a game and when I went and put in textboxes for chat It disabled the keys I was using for the game(I kinda knew it would) Is there anyway I can reclaim those lost keys (direction arrows and enter?)


Thanks


:)
 
Ok no problems,


I am making a tile based rpg. Movements are Up arrow, Down Arrow, Right arrow etc.. I just added some textboxes to the game which made it so I can't use the arrow keys anymore, because the textboxes are using them, I was wondering if there is a way to be able to use those keys again?
 
OMG ... it is not so simple as it looks on first sight. Not knowing almost anything about the app architecture and stuff i would suggest to disable the textBox controls if it's the only problem there ... myTextBox.Enabled = False. Moreover, i would replace TextBoxes with Labels ones (label doesn't accept keyboard input). But be aware, as it may cause an additional issue/s :)

HTH
Regards ;)
 
Last edited:
Its a long shot but what If I was to use direct input just for the arrow keys and enter, might that override the textbox for those keys? Or is that just noob stupid
 
if you have the form's KeyDown event look for the arrow keys then you should still be able to have the focus on the textbox but yet the arrow keys will still move your "character"

i think that's what the question/problem is here anyways
 
Thank you everyone for your help I found a setting on the form design called keypreview and I set that to true and It works now :)
 
... sorry but I found another problem. I can use the all the keys now, except for the enter key, I think this has to do with the textbox control using it, is there a way to call am event with the enter key?
 
A created a test form with textboxs and the KeyPreview set to true, created an event handler for the KeyUp event and was able to detect an Enter key.
 
Back
Top