PC Review


Reply
Thread Tools Rate Thread

closing and re-open forms problems

 
 
=?iso-8859-1?Q?Kjartan_Malthe-S=F8renssen?=
Guest
Posts: n/a
 
      19th Jul 2003
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
 
Reply With Quote
 
 
 
 
Serge Bollaerts
Guest
Posts: n/a
 
      19th Jul 2003
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



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Closing Open Bound Forms robin9876@hotmail.com Microsoft Access Forms 2 1st Sep 2006 10:48 AM
Problems when closing forms Uros Microsoft Access 1 21st Oct 2005 10:59 AM
Requery forms is closing certain forms. =?Utf-8?B?dGhlcnJpZW4=?= Microsoft Access Form Coding 0 6th Jul 2005 03:52 PM
Problems with users closing forms. =?Utf-8?B?UGF1bA==?= Microsoft Access Forms 3 30th Jun 2005 04:16 PM
problems with programs closing after open =?Utf-8?B?YnM=?= Windows XP Help 1 13th Jun 2004 05:25 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:39 PM.