TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
patrick
NA
397
0
stopping keypresses
May 18 2009 11:20 AM
Im using this code to try to block closing keys, but alt-f4 still closes the form. protected override void OnKeyDown(KeyEventArgs e) { if (e.KeyData==Keys.F4||e.Modifiers==Keys.Alt) { e.SuppressKeyPress = true; e.Handled = false; } } The purpose was to stop these keypresses, add an exit button(the only way to close the form) and get a password before letting the form close.
Reply
Answers (
3
)
When To Use Interface
Integer to Binary in C#