,If, you want to know that any key is pressed
then follow the following code:
First, get a key down event of your richtextbox or textbox
as it is given in this pic.
then follow the following code:
First, get a key down event of your richtextbox or textbox
as it is given in this pic.
double click on this event of your textbox or rich text box
this event occurs when ever a key is pressed
...
now,
private void richTextBox1_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Space)
{
/// do your work here
MessageBox.Show("space");
}
if (e.KeyCode == Keys.F2)
{
MessageBox.Show("f2");
}
}
Enjoy the joy of Coding
God Bless You
Jai SiyaRam
Enjoy the joy of Coding
God Bless You
Jai SiyaRam
No comments:
Post a Comment