Delphi7 文件菜单中的新建与退出 请问下面的程序为什么会出现[Error] Unit1.pas(35): Record, object or c
unitUnit1;interfaceusesWindows,Messages,SysUtils,Variants,Classes,Graphics,Controls,F...
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Menus, StdCtrls;
type
TForm1 = class(TForm)
N1: TMenuItem;
N2: TMenuItem;
N3: TMenuItem;
procedure N2Click(Sender: TObject);
procedure N3Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.N2Click(Sender: TObject);
var
mmo1: string;
begin
mmo1.Text :='';
end;
procedure TForm1.N3Click(Sender: TObject);
begin
Application.Terminate;
end;
end. 展开
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Menus, StdCtrls;
type
TForm1 = class(TForm)
N1: TMenuItem;
N2: TMenuItem;
N3: TMenuItem;
procedure N2Click(Sender: TObject);
procedure N3Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.N2Click(Sender: TObject);
var
mmo1: string;
begin
mmo1.Text :='';
end;
procedure TForm1.N3Click(Sender: TObject);
begin
Application.Terminate;
end;
end. 展开
2个回答
展开全部
var
mmo1: string;
begin
mmo1.Text :='';
end;
上面的代码有误,mmo是干什么用的?mmo1.Text :='';应该改为mmo1:='';
还有你在类型type
TForm1 = class(TForm)
N1: TMenuItem;
N2: TMenuItem;
N3: TMenuItem;
procedure N2Click(Sender: TObject);
procedure N3Click(Sender: TObject);
下少了个
MainMenu1: TMainMenu;
应该改为:
TForm1 = class(TForm)
MainMenu1: TMainMenu;
N1: TMenuItem;
N2: TMenuItem;
N3: TMenuItem;
procedure N2Click(Sender: TObject);
procedure N3Click(Sender: TObject);
mmo1: string;
begin
mmo1.Text :='';
end;
上面的代码有误,mmo是干什么用的?mmo1.Text :='';应该改为mmo1:='';
还有你在类型type
TForm1 = class(TForm)
N1: TMenuItem;
N2: TMenuItem;
N3: TMenuItem;
procedure N2Click(Sender: TObject);
procedure N3Click(Sender: TObject);
下少了个
MainMenu1: TMainMenu;
应该改为:
TForm1 = class(TForm)
MainMenu1: TMainMenu;
N1: TMenuItem;
N2: TMenuItem;
N3: TMenuItem;
procedure N2Click(Sender: TObject);
procedure N3Click(Sender: TObject);
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询