S stonehuang Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-05 #1 form1中点一个按钮button1,form2出现,再点一下form2消失的代码怎么写啊! 具体点吧,用if ...then...或者其它,究竟怎么写呢???
J jsxjd Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-05 #3 if form2.visible then form2.show else form2.hide;
Y yeath Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-05 #4 加代码 form2.visible := not form2.visible;
Y yangxiao_jiang Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-05 #5 是想创建还是隐藏, 隐藏 visable:=false; 创建 application.create()
汪 汪向阳 Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-05 #6 是在点一下Button1吗 form2是模式窗体还是无模式窗体
I isbo Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-05 #7 form2.ShowModal; 其实很多,DELPHI的实例中有! 你自己用DELPHI新建MDI类,就明白了,看一下关于窗口的创建方法
汪 汪向阳 Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-05 #8 procedure TForm1.Button1Click(Sender: TObject); begin if not assigned(form2) then begin form2 := tform2.Create(application); form2.Show; end else begin form2.Free; form2 := nil; end; end;
procedure TForm1.Button1Click(Sender: TObject); begin if not assigned(form2) then begin form2 := tform2.Create(application); form2.Show; end else begin form2.Free; form2 := nil; end; end;