Hi,
I tried a lot for "typing an sms" as we do in mobile phone using delegate and events where button keypress will happen 3 or 4 times. for example, if we press button '9', we get 'w', and if we press the same button continuously for 2 times, we get 'x' and so on... . This is to be done in windows application. I want to raise an event every time I press a button. I am not able to get it.
Please help me......
Loading

Ben25 reputationPosted Sep 4, 2009, 1:40 AM EDT
void textBox1_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.NumPad0) // Key 0 from numpad { // Do stuff } if (e.KeyCode == Keys.NumPad1) // Key 1 from numpad { // } if (e.KeyCode == Keys.NumPad2) { // } // .... // .... }srinath133 reputationPosted Sep 4, 2009, 3:42 AM EDT
But here I am using a delegate and event. I am not trying for particular display like textbox or label....... . The code should be useful for any display. When a button key is pressed, that particular event should raise. This is to be done in windows application. Here I am giving common keypress event for all the buttons.
Master BillaRank #2,229 · 630 reputationPosted Sep 4, 2009, 8:53 AM EDT
Yes you can develop
Here is sample article
http://www.codeproject.com/KB/miscctrl/MCKeyboard.aspx
thank you