Grabbing Text Input with C# / .net
-
Im writing a game in C# with .net and DirectX 9. I'm using DirectInput for in-game input, but when it comes to entering text (chat, player names, etc) directX isnt really something you want to use (Im using action mapping btw so that would be a real pain). I'm wondering if anyone has, or has any advice, on creating a simple but effecient way of getting keyboard text in C# w/ .net. When programming under win32 I use to grab the WM_CHAR message and manually process that. So far I've come up with making a onKeyDown event handler and writing a function to manually add each character, casted from EventArgs.KeyValue, to a string. The problem with this is its a pain to keep track if shift is pressed down, and Im having problems accepting symbols such as . , ; ' etc. It just seems there should be an easier way. I'd like to have case sensitivity, symbols, backspacing, etc without spending too much time writing a robust text grabber. Any ideas? Just to clarfiry - Im not looking at like a windows control or other type of form component for inputting text into. This is a full screen game and I need to have text input and I cant use DirectX to do it. Thanks for any help Dave Ratti