Re: RE: x button

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Just_a_fan@home.net

    #1

    Re: RE: x button

    Be sure to let a Windows Shutdown call to go through or your user will
    really be upset by having to press the power button to shut down
    Windows!

    There used to be a "shutdown source" (not the right name, I expect) code
    of some kind that said where the close message was coming from. I have
    no idea how to treat it these days.

    Just a thought...

    Mike

    On Thu, 10 Apr 2008 10:41:00 -0700, in
    microsoft.publi c.dotnet.langua ges.vb Family Tree Mike
    <FamilyTreeMike @discussions.mi crosoft.comwrot e:
    >Just so it is covered, another way to prevent closing the app regardless of
    >the close method ([x], alt-f4, the icon in the upper left then close, etc),
    >is to handle the FormClosing event. the FormClosingEven tArgs argument
    >contains a property called Cancel that you can set to true when you feel
    >closing the form should not happen.
    >
    >"enrico via DotNetMonster.c om" wrote:
    >
    >is there a way that you can eliminate the x(close) button of your form
    >without setting the border style to none?
    >>
    >--
    >Message posted via http://www.dotnetmonster.com
    >>
    >>
  • Steve Gerrard

    #2
    Re: RE: x button

    The e.CloseReason property of the FormClosing event argument tells you why the
    form is closing.

    Just_a_fan@home .net wrote:
    Be sure to let a Windows Shutdown call to go through or your user will
    really be upset by having to press the power button to shut down
    Windows!
    >
    There used to be a "shutdown source" (not the right name, I expect)
    code of some kind that said where the close message was coming from.
    I have no idea how to treat it these days.
    >
    Just a thought...
    >
    Mike
    >
    On Thu, 10 Apr 2008 10:41:00 -0700, in
    microsoft.publi c.dotnet.langua ges.vb Family Tree Mike
    <FamilyTreeMike @discussions.mi crosoft.comwrot e:
    >
    >Just so it is covered, another way to prevent closing the app
    >regardless of the close method ([x], alt-f4, the icon in the upper
    >left then close, etc), is to handle the FormClosing event. the
    >FormClosingEve ntArgs argument contains a property called Cancel that
    >you can set to true when you feel closing the form should not happen.
    >>
    >"enrico via DotNetMonster.c om" wrote:
    >>
    >>is there a way that you can eliminate the x(close) button of your
    >>form without setting the border style to none?
    >>>
    >>--
    >>Message posted via http://www.dotnetmonster.com

    Comment

    Working...