How to respond to Close without quitting?

G

Guest

Hi all,

I need to be able to hide a child form (e.g. an about box)
when the user closes it with the Close icon in the title bar
(control menu), but I need only to hide the form and not
to unload it because I am using certain variables from the
form in my main form?

tnx.
 
C

Cor Ligthert [MVP]

Lucio,
I need to be able to hide a child form (e.g. an about box)
when the user closes it with the Close icon in the title bar
(control menu), but I need only to hide the form and not
to unload it because I am using certain variables from the
form in my main form?
Do you use showdialog to show that about box
Some normal code for this.

\\\
Dim myaboutbox as new aboutform
myaboutbox.showdialog
myvariable = myaboutbox.publicvariable
myaboutbox.dispose
///

I hope this helps,

Cor
 
G

Guest

Hi Cor,

I think I fixed the problem now, the mistake was I used
show() instead of showdialog(). With showdialog the
form will not be unloaded when the user "closes".
with show() - the form is unloaded.
tnx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top