Hello everyone,
I am developing a windows application in C#.
On form_keydown event
if (e.KeyCode == Keys.Escape)
{
this.Close();
}
this is working properly
but i want to save data on ctrl+s
i tried for
if (e.KeyCode == Keys.control + Keys.S)
but it throws an error
please help me out.
Regards,
Zuber I. Kazi.
Loading
kishore kumarPosted Mar 9, 2012, 1:53 AM
//83 Key code for 'S'
If(e.Control && e.KeyValue==83)
{
}
Regards,
Kishore
Zuber KaziPosted Mar 9, 2012, 1:43 AM
but it again shows an error
"Error 1 Operator '==' cannot be applied to operands of type 'System.Windows.Forms.Keys' and 'int' "
Sam HobbsPosted Mar 7, 2012, 8:44 AM
kishore kumarPosted Mar 7, 2012, 7:13 AM
//83 Key code for 'S'
If(e.Control && e.KeyCode==83)
{
}
Regards,
Kishore