G
gmtyt
Unregistered / Unconfirmed
GUEST, unregistred user!
help:菜单调用表单时出现:Unable to invoke Code Completion due to errors in source code ( 积分: 100 )<br />我在主表单中用菜单调用表单2的时候,
procedure TForm1.N8Click(Sender: TObject);
begin
form2.
end;
在点到form2.的时候出现Unable to invoke Code Completion due to errors in source code
我想问的是:我应该怎么调用这个表单啊?这个表单的name是form2,文件名是:unit2.dfm和unit2.pas
以下是main.pas的代码
unit main;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Menus;
type
TForm1 = class(TForm)
MainMenu1: TMainMenu;
N1: TMenuItem;
N2: TMenuItem;
N3: TMenuItem;
N4: TMenuItem;
N5: TMenuItem;
N6: TMenuItem;
N7: TMenuItem;
N8: TMenuItem;
procedure N8Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.N8Click(Sender: TObject);
begin
form2.
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
end;
end.
procedure TForm1.N8Click(Sender: TObject);
begin
form2.
end;
在点到form2.的时候出现Unable to invoke Code Completion due to errors in source code
我想问的是:我应该怎么调用这个表单啊?这个表单的name是form2,文件名是:unit2.dfm和unit2.pas
以下是main.pas的代码
unit main;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Menus;
type
TForm1 = class(TForm)
MainMenu1: TMainMenu;
N1: TMenuItem;
N2: TMenuItem;
N3: TMenuItem;
N4: TMenuItem;
N5: TMenuItem;
N6: TMenuItem;
N7: TMenuItem;
N8: TMenuItem;
procedure N8Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.N8Click(Sender: TObject);
begin
form2.
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
end;
end.