我现在有个一个工程文件,里面现在有两个窗体文件(dfm),由于我以前已做好了一个窗体文件A(包括A.pas,A.dfm文件),我现在要把A文件加到这个工程里面去,请问大家怎么样加进去?
我试过在"add project"菜单里面,加进工程,也能加进去,但是使用show方法时,提示A为非发标示符,我不知道问题出在那里,请大家告诉我,我等着。
我试过在"add project"菜单里面,加进工程,也能加进去,但是使用show方法时,提示A为非发标示符,我不知道问题出在那里,请大家告诉我,我等着。
看一下原程序;
program Project1;uses
Forms,
Unit1 in 'Unit1.pas' {Form1},
unitAboutFrm in 'unitAboutFrm.pas' {AboutForm};{$R *.res}begin
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.
unit Unit1;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;type
TForm1 = class(TForm)
Button1: TButton;
procedure FormCreate(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
AboutFrom.show;
end;end.我要加的是AboutFrom,请大家看一下原程序,看那里有错误。
unit Unit1;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;type
TForm1 = class(TForm)
Button1: TButton;
procedure FormCreate(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementationuses unitAboutFrm;{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);
begin
AboutForm.show;
end;end.
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
里面加上AboutForm的unit