Results 1 to 6 of 6

Thread: How to close a window

  1. #1

    Thread Starter
    Addicted Member WAcKeD's Avatar
    Join Date
    Aug 2000
    Posts
    211

    Question

    How do you close a window that you've opened with the tag Form2.show using a button??? As you can see I'm a newbie...
    Thankz,
    WAcKeD

  2. #2
    Frenzied Member
    Join Date
    Mar 2000
    Posts
    1,089
    Code:
    Private Sub Command1_Click()
    Unload Form2
    End Sub

  3. #3

    Thread Starter
    Addicted Member WAcKeD's Avatar
    Join Date
    Aug 2000
    Posts
    211

    Talking

    Thanks for the fast reply...It works great.
    Thankz,
    WAcKeD

  4. #4
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    There's another way, <font color="#00007F">If</font> you<font color="#007F00">'re interested....
    </font>
    <font color="#00007F">Declare</font> the API call (<font color="#00007F">In</font> API viewer, find the function CloseWindow) CloseWindow. <font color="#00007F">Then</font> run this:

    [code]
    <font color="#00007F">Private</font> <font color="#00007F">Sub</font> Command1_Click()
    CloseWindow Form2.hWnd
    <font color="#00007F">End</font> <font color="#00007F">Sub</font>
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  5. #5
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    Sorry, the server must have screwed when I posted last time, it looks really bad .
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  6. #6

    Thread Starter
    Addicted Member WAcKeD's Avatar
    Join Date
    Aug 2000
    Posts
    211

    Talking

    Its okay, thanx too!
    Thankz,
    WAcKeD

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