-
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?
-
I think the best way is just to send the window the WM_CLOSE message (use callwindowproc or sendmessage, wParam = lParam = 0)
-
The Unload statement triggers the QueryUnload event.
Code:
Private Sub Xit_Click()
Unload Me
End Sub
-
Thanks!!
I was able to do it either way.
-
The Unload statement trigger's not only the QueryUnload event but also the Unload and Terminate events respectivly.