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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top