|
-
March 29th, 2010, 12:07 AM
#1
C#.NET2008 Cannot close FRMSALES
Hi Good Guys,
Please help me, I need your help.
I am a Newbie writing C#.Net 2008 Window Application.
In the FRMSALES, to exit this form the users can either click on BTNEXIT or press the ESC Key but both of them are not working.
Here is the error message:
'System.EventArgs' does not contain a definition for 'KeyCode' and no extension method 'KeyCode' accepting a first argument of type 'System.EventArgs' could be found (are you missing a using directive or an assembly reference?)
Here is the coding (C#.NET 2008)
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
private void btnexit_Click(object sender, System.EventArgs e)
{
this.Close;
}
private void FrmMain_KeyDown(Object sender, System.EventArgs e)
{
if (e.KeyCode = Keys.Escape)
this.Close;
}
Thank you,
Cheers,
Lennie
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|