Results 1 to 5 of 5

Thread: Borderless form and subclassing

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 1999
    Location
    MA, USA
    Posts
    523
    I have a Window without a titlebar and I need to subclass it (no problem with that). Now the problem is: to make VB not crash I would have to end my application by clicking the x button. But I don't have the x button. I have created my own form with custom close, min, max etc buttons. Now is there a way of exiting program without having to worry about what method I use to end?

  2. #2
    Frenzied Member
    Join Date
    Mar 2000
    Posts
    1,089
    I think the best way is just to send the window the WM_CLOSE message (use callwindowproc or sendmessage, wParam = lParam = 0)

  3. #3
    Guest
    The Unload statement triggers the QueryUnload event.

    Code:
    Private Sub Xit_Click()
    Unload Me
    End Sub

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Oct 1999
    Location
    MA, USA
    Posts
    523
    Thanks!!
    I was able to do it either way.

  5. #5
    Guest
    The Unload statement trigger's not only the QueryUnload event but also the Unload and Terminate events respectivly.

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