Re: How to disable Ctrl+F4?
- From: "Ben Voigt" <rbv@xxxxxxxxxxxxx>
- Date: Tue, 7 Nov 2006 13:38:59 -0600
"DeveloperX" <nntpDev@xxxxxxxxxxxxx> wrote in message
news:1162917904.674213.5150@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Add code to the Closing evening for the child form and set e.cancel =
true; in those cases you don't want it to close.
Use the FormClosing event so you get CloseReason:
ApplicationExitCall The Exit method of the Application class was invoked.
FormOwnerClosing The owner form is closing.
MdiFormClosing The parent form of this multiple document interface (MDI)
form is closing.
None The cause of the closure was not defined or could not be determined.
TaskManagerClosing The Microsoft Windows Task Manager is closing the
application.
UserClosing The user is closing the form through the user interface (UI),
for example by clicking the Close button on the form window, selecting Close
from the window's control menu, or pressing ALT+F4.
WindowsShutDown The operating system is closing all applications before
shutting down.
Then test for UserClosing
Richard Lewis Haggard wrote:
Is there an easy way to disable the hotkey sequence Control F4 or
otherwise
prevent the action from killing off MDI child windows in VS05/WinForms 2?
I've already figured out how to get rid of the 'x' in the caption bar but
the hot key sequence is still allowing users to kill off MDI child
windows,
which I need to prevent from happening.
--
Richard Lewis Haggard
www.Haggard-And-Associates.com
.
- References:
- How to disable Ctrl+F4?
- From: Richard Lewis Haggard
- Re: How to disable Ctrl+F4?
- From: DeveloperX
- How to disable Ctrl+F4?
- Prev by Date: Re: Type alias in C#
- Next by Date: Re: Type alias in C#
- Previous by thread: Re: How to disable Ctrl+F4?
- Next by thread: CJK Text in Console Application
- Index(es):
Relevant Pages
|