A
Anthony P.
Hello Everyone,
I'm writing an application that will reside in the system tray once it
is configured. The application also has an exit button called,
creatively, ExitButton. I'm in a bit of a pickle here and not sure how
to solve it. Here's the deal:
When the user clicks the X in the forms control box (which fires the
FormClosing() event) I minimize the form to the service tray. That
works.
Now, when the user clicks the button (ExitButton) the
ExitButton_Click() subroutine does one thing: It calls
Application.Exit() (which of course...fires the FormClosing() event).
See the problem?
So I need a way to distinguish what is generating the FormClosing()
event: the button or the click on the control box. Both seem to be
firing the Application.Exit() method which, in turn raises the
FormClosing() event.
Can anyone clue me in?
Thanks!
Anthony
I'm writing an application that will reside in the system tray once it
is configured. The application also has an exit button called,
creatively, ExitButton. I'm in a bit of a pickle here and not sure how
to solve it. Here's the deal:
When the user clicks the X in the forms control box (which fires the
FormClosing() event) I minimize the form to the service tray. That
works.
Now, when the user clicks the button (ExitButton) the
ExitButton_Click() subroutine does one thing: It calls
Application.Exit() (which of course...fires the FormClosing() event).
See the problem?
So I need a way to distinguish what is generating the FormClosing()
event: the button or the click on the control box. Both seem to be
firing the Application.Exit() method which, in turn raises the
FormClosing() event.
Can anyone clue me in?
Thanks!
Anthony