L lcmlhs Unregistered / Unconfirmed GUEST, unregistred user! 2008-06-10 #1 Tedit是Tform里的控件,在tedit的onkeydown里调出带有edit2的form2的窗体,单击form2上的按钮,把edit2的内容写到tedit里,之后关闭form2窗体。
K KevinJo Unregistered / Unconfirmed GUEST, unregistred user! 2008-06-10 #2 if not Assigned(form2) then form2 := Tform2.Create(application); try form2.ShowModal; if form2.ModalResult = mrOK then edit1.text := form2.edit2.text; finally form2.free; form2 := nil; end; 在form2的按钮单击事件上加 ModalResult := mrOK;
if not Assigned(form2) then form2 := Tform2.Create(application); try form2.ShowModal; if form2.ModalResult = mrOK then edit1.text := form2.edit2.text; finally form2.free; form2 := nil; end; 在form2的按钮单击事件上加 ModalResult := mrOK;
K kzjsuper Unregistered / Unconfirmed GUEST, unregistred user! 2008-06-10 #3 按钮事件中写: form1.edit1.text :=edit2.text; form2.close;
L lcmlhs Unregistered / Unconfirmed GUEST, unregistred user! 2008-06-21 #4 其实我是在类方法里传递的,好帖了,谢谢两朋友,顺便发个交流群: delphi天堂:4654765