Key Press Event : ctrl + C
-
Hi, I have a RichTextBox and i want to do something when the user press on the RichTextBox with the combination of the keys : ctrl + 'C'. I created this event :
private void m_richTextBox1_KeyUp(object sender, KeyEventArgs e)
{
if (e.Control && e.KeyData== Keys.C)
{
//Do Something
}
}but when the user press on the keys it's recognize only the 'ctrl' key and not the char 'C'. What is the problem and what should i do? 10X.
-
Hi, I have a RichTextBox and i want to do something when the user press on the RichTextBox with the combination of the keys : ctrl + 'C'. I created this event :
private void m_richTextBox1_KeyUp(object sender, KeyEventArgs e)
{
if (e.Control && e.KeyData== Keys.C)
{
//Do Something
}
}but when the user press on the keys it's recognize only the 'ctrl' key and not the char 'C'. What is the problem and what should i do? 10X.
In either
KeyDown
orKeyUp
if (e.KeyCode == Keys.C && e.Modifiers == Keys.Control)
{
//
}Dave
Generic BackgroundWorker - My latest article!
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Why are you using VB6? Do you hate yourself? (Christian Graus) -
In either
KeyDown
orKeyUp
if (e.KeyCode == Keys.C && e.Modifiers == Keys.Control)
{
//
}Dave
Generic BackgroundWorker - My latest article!
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Why are you using VB6? Do you hate yourself? (Christian Graus)Thanks for your help.