Hi,
The simpliest way to achieve that is to set ControlBox to False, but the
icon is not displayed.
The Second way is:
1. Declare a boolean CanClose
2. In your close/cancel button, type
CanClose = True
Me.Close
3. In the From_Closing, use the parameter e to cancel the action with
e.Cancel = Not CanClose
Serge
"Kjartan Malthe-Sørenssen" <(E-Mail Removed)> wrote in
message news:07e501c34e05$48585f60$(E-Mail Removed)...
> Hi
>
> I'm developing in VB.NET and was wondering how to open a
> form that has been closed by a user by pressing the close
> button (X) on the form. I currently use a Back and Next
> button to navigate through a simple wizard that i
> created, but pressing the forms close button will
> generate an exception when trying to re-display the from
> that was closed.
>
> Also is there a way to override the close button on a
> form so that when a user presses this button it is not
> closed but hidden instead?
>
> Thank you!
>
> kjartan
|