Home > Back-end >  How to quote the dynamically generated in the second form of the first form of value
How to quote the dynamically generated in the second form of the first form of value

Time:09-21

As shown in the following:
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 sand

CodePudding user response:

Can define a global variable, the value of the records released edit1

CodePudding user response:

reference 1st floor jankercsdn response:
frm_sand is what? The form variables?

Is the name of the form of a string

CodePudding user response:

reference jjpweb reply: 3/f
form1 USES sand yao

None of quote don't refer to business

CodePudding user response:

refer to the second floor lyhoo163 response:
1, not in 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.

It seems no better way, only such, well, data is not much use
  • Related