F1:='Frm_Sand';
Tf1:='TFrm_Sand';
//CreateMyForm (tf1, f1);
If Application. FindComponent (f1)=nil then
The begin
If GetClass (Tf1) & lt;> Nil then
The begin
With TForm (TComponentClass (FindClass (Tf1)). The Create (application) do
The begin
Name:=f1;
Showmodal;
Free;
end;
end;
End
The else
The begin
TForm (Application. FindComponent (f1).) ShowModal;
Free;
end;
Frm_sand use the above code generated form, and then again on the form frm_sand create opens a form Form1, quote frm_sand. In Form1 edit1. Error text, if created before the reference frm_sand instance, shows the value of the empty
CodePudding user response:
What is frm_sand? The form variables?CodePudding user response:
1, the dynamic form of the reference value, the value of (control) will be read error,2, you can set a global variable, as a buffer, the dynamic form will need to value written to the buffer variable, read again,
CodePudding user response:
Form1 USES the sandCodePudding user response:
Can define a global variable, the value of the records released edit1CodePudding user response: