5,388
社区成员
发帖
与我相关
我的任务
分享
Action:=caFree;
uses Unit17;
procedure TForm18.Button1Click(Sender: TObject);
begin
if Self.ActiveMDIChild = Form17 then
Self.ActiveMDIChild.Close;
Form17 := TForm17.Create(Self);
Form17.Show;
end;
unit Unit18;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm18 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form18: TForm18;
implementation
{$R *.dfm}
uses Unit17;
procedure TForm18.Button1Click(Sender: TObject);
var
Form17: TForm17;
begin
Form17 := TForm17.Create(Self);
Form17.Show;
end;
end.