Tech
Forums
Jobs
Books
Events
Live
Learn
More
Training
Interviews
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
1
Reply
Disable Alt+F4 and Esc in VB.net application
Hardik Patel
Aug 8 2015 2:24 AM
838
Reply
i am using global function to disable alt+F4 and Esc
Esc is working but alt is not working. pls help
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
if (keyData == Keys.Escape)
{
MessageBox.Show("sorry you cannot close this form via Esc!!!");
return true;
}
else if (keyData == Keys.Alt)
{
MessageBox.Show("sorry you cannot close this form via Esc!!!");
return true;
}
return base.ProcessCmdKey(ref msg, keyData);
}
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
how to subtract a value from database with a value from text
Exception in validating Schema