Creating a form - a function controls it!
Posted on 2000-05-02
I want to do a function. I'll control my form creation (my application will show only one form, non-modal)...
Here is the code:
function abreform(instancia: tcomponentClass; var Reference): boolean;
abreform := false;
if not Assigned(tform(reference)) then
abreform := true;
messagedlg('The form is opened', mtinformation, [mbok], 0);
The problem is after the first form creation... The function don't restart the variable and returns 'Form is opened'... I've closed the respective form, and I did the caFree command...
Can you help me?!?
Thanks a lot!