How can I override a handler for a Form ControlBox
How do I override the handler for the close?
Learning the .NET Framework still. Whats the correct way to do this?
Thanks.
How do I override the handler for the close?
Learning the .NET Framework still. Whats the correct way to do this?
Thanks.
See if handling the Closing/Closed events gets you where you want to be.
Cheers
Daniel
Me.MinizeButton = False
To override the Closing event, add this method to your Form:
Private Sub Form1_Closing(sender As Object, e As System.ComponentModel.CancelEventArgs) _
Handles MyBase.Closing
MsgBox("Closing App")
' do stuff
End Sub
For more information about Pocket PC form factors using the .NET Compact Framework, see:
http://msdn2.microsoft.com/en-us/library/bxz0e21k(en-US,VS.80).aspx
Also, see the Pocket PC User Interface Guidelines:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/guide_ppc/html/ppc_pcconapplicationhelpforpocketpcs.asp
Hope this helps,
- Bruce Hamilton
.NET Compact Framework User Education
Me.MinimizeBox = False
Probably the confusion is that "X" means close in Windows XP but Minimize in the mobile O.S., in my case I am using CE 5.0. So obviously the Closed event is not raised when the window is minimized, even though the X intuitively should be "close". Instead, "ok" means close. Just my two cents.