Friday 9 September 2011

Alert on when a combination of keys is pressed




First get a event of your text feild (like text box) in your project


double click on this event of your textbox or richtextbox
this event occurs when ever a key is pressed

now the code,
 private void richTextBox1_KeyDown(object sender, KeyEventArgs e)
        {
   


            /////////// do your work here
            if (Control.ModifierKeys == Keys.Control && e.KeyCode == Keys.E)
            {
                MessageBox.Show("ctrl + e");
            }

         
        }





Enjoy the joy of Coding
God Bless You
Jai SiyaRam


No comments:

Post a Comment