Results 1 to 3 of 3

Thread: Detect "X"

  1. #1

    Thread Starter
    Frenzied Member CyberCarsten's Avatar
    Join Date
    Sep 1999
    Location
    Aalborg , Denmark
    Posts
    1,544

    Post

    How can i detect if the 'X' (Close button) in the right corner of the window have been clicked on??


    ------------------
    Yours sincierly
    CyberCarsten
    http://home18.inet.tele.dk/cyber/
    carsten.h.thomsen@mail.tele.dk

  2. #2
    Hyperactive Member
    Join Date
    Sep 1999
    Location
    Leeds, UK
    Posts
    287

    Post

    Use the unload event of the form. For example, if you didn't want the form to close when that X was pressed:

    -----------
    Private Sub Form_Unload(Cancel As Integer)
    Cancel = True
    End Sub
    -----------

  3. #3
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,175

    Post

    The check should be done in the QueryUnload event rather than the Unload event. See my answer to a previous question.

    ------------------
    Marty
    COGITO EGGO SUM
    I think; therefore I am a waffle.

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