Re: How to disable Ctrl+F4?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance




"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



.



Relevant Pages

  • Re: Energy Discussion Part 1
    ... >> that interior walls of homes are almost never insulated. ... >> through the windows. ... If a room is un-used, rather than closing it off, I ... > the rooms because closing them off will affect the heated air thermals ...
    (misc.news.internet.discuss)
  • Re: Energy Discussion Part 1
    ... I am unconvinced that closing off un-used rooms in single story houses results in any significant energy savings. ... Even with some hyper-insulated modern windows,, almost invariably the largest heat loss in most homes, is right through the windows. ... At any home supply store, sheets of insulating foam, usually about 1" thick can be purchased for a few dollars. ...
    (misc.news.internet.discuss)
  • Re: Notification of WIndows Shutdown.
    ... application derived shutdown. ... The Unload statement is invoked from code. ... The current Microsoft Windows operating environment session is ending. ... The Microsoft Windows Task Manager is closing the application. ...
    (microsoft.public.vb.general.discussion)
  • Re: [Xnews 6.12] How do I get Xnews to remember last used server?
    ... Closing any part of a GUI application usually entails closing ... windows, but please excuse me for not connecting a window with a ...
    (news.software.readers)