Handling Process.Close event

  • Thread starter Thread starter Joshua T. Moore
  • Start date Start date
J

Joshua T. Moore

If application A sends a Process.Close message to application B, is there an
event handler in application B to handle it? The problem is that
application A sends the close message to application B, but since B has
modal dialogs up, it doesn't close. I don't want to send a Process.Kill
because then the user would not have the option of saving (or not saving) on
exit.

Thanks,
J
 
Joshua said:
If application A sends a Process.Close message to application B, is there an
event handler in application B to handle it? The problem is that
application A sends the close message to application B, but since B has
modal dialogs up, it doesn't close. I don't want to send a Process.Kill
because then the user would not have the option of saving (or not saving) on
exit.

Thanks,
J

Handle the Closing event. Then if you don't want it to close, set
e.Cancel = true.

John
 
Back
Top