还是不行,不知道错在哪里了//form1 form2:=Tform2.Create(application); form2.Show; self.Close;//form2 form2.name:='form'+edit1.text;//form3 if Assigned(Application.FindComponent('form'+edit1.text))) then showmessage (inttostr(edit1.text));
应该可以的,你form2和form3中的edit1.text的值要一样才能找到, 还有form3中有点错: if Assigned(Application.FindComponent('form'+edit1.text)) then showmessage (edit1.text);
showmessage('form2 already be created');
if FormA = Nil then
FormA:= TForm2.Create(FormA);
FormA.WindowState := wsNormal;
FormA.Show;
在Form3中:
if Assigned(Form1.FindComponent('Form2的名字')) then
ShowMessage('Form2的名字 已被创建');
就象QQ接受消息后的回复一样
在Form3中:
if Assigned(Application.FindComponent('form22')) then
ShowMessage('form22已被创建');
form2.name:=edit1.text+'sendform'?不是这样吧
form2.name:='sendform'+edit1.text;
form2:=Tform2.Create(application);
form2.Show;
self.Close;//form2
form2.name:='form'+edit1.text;//form3
if Assigned(Application.FindComponent('form'+edit1.text))) then showmessage (inttostr(edit1.text));
还有form3中有点错:
if Assigned(Application.FindComponent('form'+edit1.text)) then showmessage (edit1.text);