Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Detect form_unload attempt while already in form_unload 1

Status
Not open for further replies.

msc0tt

IS-IT--Management
Jun 25, 2002
281
CA
I've got a short delay at the end of my Form_Unload routine to ensure the status box says on the screen for a few seconds. While in this routine, I would like to 'detect' if the user presses the [X] "close window" control button so I can expedite the delay. Could this be possible?
 
Use the Form_QueryUnload event instead of Form_Unload. The QueryUnload event has a parameter that tells you what has caused the unload request.

MSDN Entry for QueryUnload

Take Care

Matt
If at first you don't succeed, skydiving is not for you.
 
Thanks Matt! I'll investigate this today!
-Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top