here is the code
private void Form1_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == 'a')
{
Application.Exit();
e.Handled =
}
}
true;
{
if (e.KeyChar == 'a')
{
Application.Exit();
e.Handled =
}
}
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
FroglegRank #1,020 · 1.9K reputationPosted Mar 17, 2012, 10:02 PM EDT
brunda kRank #3,804 · 389 reputationPosted Mar 17, 2012, 11:40 PM EDT
FroglegRank #1,020 · 1.9K reputationPosted Mar 17, 2012, 11:57 PM EDT
FroglegRank #1,020 · 1.9K reputationPosted Mar 18, 2012, 12:01 AM EDT