Posted on 2001-08-22
I want to pervent creation of the form if the form has already created.
I have put this in my application:
if Not Assigned(PaymentForm) then
PaymentForm := TPaymentForm.Create(Self);
procedure TPaymentForm.FormClose(Sender: TObject;
var Action: TCloseAction);
Action := caFree;
PaymentForm := nil;
and everything is OK.
BUT! How can I close the form if Error occured when the form is creating during TPaymentForm.FormCreate precedure executiing?
procedure TPaymentForm.FormCreate(Sender: TObject);
there I want to close the form! HOW?