CPB Mailing List
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Can't close my form... Close() isn't doing it... :(
Aurora wrote:
Now the pgm has no probs exitting if I close on a
button event, but from
FormCreate it won't work... I have my theories... I need solutions...
:(
I'm guessing the FormCreate() function is attached to the OnCreate event
of your form. If that is the case, you can't close the form there
because it has NOT been fully created yet.
1. If this is not your main form and it was created by you using 'new',
try calling the form's Close() function after the 'new'.
2. If this is your main form, you MUST register it by letting BCB create
it with a call to FormCreate() - but only when you want the form to stay
up. This is not your case. So although I have never tried this,
my guess is that you SHOULD instanciate your form using 'new' and create
an OnClose event handler where you set 'Action = caFree;'. Because
the form is not registered with BCB your program won't have a main form
and BCB will immediately close the app.
Hope this makes sense,
Stéphane
--
***********************************************
Stephane Mahaux
Professional:
Hyperian Development Solutions
Hyperian@MailExcite.com
Personal:
mahaux@freenet.edmonton.ab.ca
http://www.freenet.edmonton.ab.ca/~mahaux
***********************************************
W Komornicki's Home Page |
Main Index |
Thread Index