Overrides Form Close Button

  • Thread starter Thread starter Strider
  • Start date Start date
S

Strider

Can someone tell me how to override the X button on the form.
I cant find it in the overrides drop down.

When the X is clicked it destroys the instance of the form. I want to
stop this from happening

Cheers
 
Hi Barry,

Could you specify your target platform?

On Pocket PC, X button is used to minize the form. It does not close the
form. So you can not get the Close event when X button is clicked.

If you are developing on a Windows CE .NET embedded device, you can handle
Closing and Closed events on VB .NET.

Thanks

Ercan Turkarslan
Microsoft Mobile Devices Developer Support
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Newsgroups: microsoft.public.dotnet.framework.compactframework
From: (e-mail address removed) (Ercan Turkarslan [MS])
Date: Fri, 15 Oct 2004 17:12:56 GMT
Subject: Re: Override Form Close Button

Hi,

On Windows CE .NET, the form should fire Closing event before closing and
Closed event when the Form is closed.

However, if you call Application.Exit, these two event will NOT be
triggerred. If you have to execute the code inside these event handlers you
should call Form.Close for each open form before calling Application.Exit.

Thanks

Ercan Turkarslan
Microsoft Mobile Devices Developer Support
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top