C
Claudia Fong
I use keypress event to detect the characters users input, but it
doesn't work with Alt tab.. I need to detect the combination Alt-A or
Alt-F1.. how should I do?
The code is below:
private void Form1_KeyPress(object sender, KeyPressEventArgs e)
{
if ((e.KeyCode = Keys.F1 && e.Alt == true))
{
e.Handled = true;
// Open second form here
Form2 frm = new Form2();
frm.Show();
}
}
Cheers!
Claudi
doesn't work with Alt tab.. I need to detect the combination Alt-A or
Alt-F1.. how should I do?
The code is below:
private void Form1_KeyPress(object sender, KeyPressEventArgs e)
{
if ((e.KeyCode = Keys.F1 && e.Alt == true))
{
e.Handled = true;
// Open second form here
Form2 frm = new Form2();
frm.Show();
}
}
Cheers!
Claudi