Results 1 to 2 of 2

Thread: Responding to Events on a forms controlbox.

  1. #1

    Thread Starter
    Member
    Join Date
    Aug 2000
    Posts
    39

    Question

    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

  2. #2
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    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]
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width