有2个form,form1中有button1,button2,form2中有label1,
点button1和button2都能调出form2,
点button1调出的form2,label1.caption显示为'button1'
点button2调出的form2,label1.caption显示为'button2'
如何实现?
点button1和button2都能调出form2,
点button1调出的form2,label1.caption显示为'button1'
点button2调出的form2,label1.caption显示为'button2'
如何实现?
Form2.Show;
Application.CreateForm(TForm2, Form2);
if TButton(Sender).name='button1' then
form2.label1.Caption:='1'
else if TButton(Sender).name='button2' then
form2.label1.Caption:='2';
form2.Show;这样写效果出不来,要怎么样改 ?
我想这程序显示用不到if
用form2的显示去判断form1的操作
行不通吧?