-
Does anyone know how to respond to a click on a forms controlbox. ie: I have an MDI Parent form, which I don't want to close without prompting for confirmation. This works when the user exits via the exit function I have put on the main menu, however a user can still close the form by clicking the X on the controlbox. Does anyone know if I can detect this click so I can ask the user if they really want to exit ?
Thanks.
DQ
-
I think you mean...
...this but I'm not really sure
Or this maybe?
http://www.mvps.org/vbnet/code/subclass/systemabout.htm
hmmm or if the above links aren't the ones you need then just look at:
http://www.mvps.org/vbnet/_vti_bin/s..._acc/index.htm
You want to modify the system-menu or something to prevent users from closing the MDI form?
I never worked with MDI, but doesn't it have a Query_Unload event?
If it has then
Code:
Private Sub MDI_QueryUnload(Cancel As Integer)
If CloseMe = False Then
Cancel = 1
End If
End Sub
Have fun!
[Edited by Jop on 09-07-2000 at 10:19 AM]