返回首页
  uu快三外挂 > 编程 > delphi >

[DCC Error] : E2003 Undeclared identifier: 'mrOK'

2019-03-08 12:57 阅读:79 来源:智宇SEO自媒体

  用delphi写个超市管理系统,需要多个窗体,登录窗体,主窗体等。要改写工程文件(*.dpr)文件

  碰到错误提示:[DCC Error] Project3.dpr(16): E2003 Undeclared identifier: 'mrOK'

  原因:mrOk在Controls中定义,故需要 Uses Controls

  具体代码如下:

program Project3;

uses
  Controls,
  Forms,
  Unit4 in 'Unit4.pas' {ShopMain},
  Unit1 in 'Unit1.pas' {Form1},
  Unit2 in 'Unit2.pas' {Login};

{$R *.res}

begin
  Application.Initialize;
  Application.MainFormOnTaskbar := True;
  Login:= TLogin.Create(Application);
  if not (Login.ShowModal = mrOK) then
  begin
  Login.Free;
  Exit;
  end;
  Login.free;
  Application.CreateForm(TShopMain, ShopMain);
  Application.CreateForm(TForm1, Form1);

  Application.Run;
end.



99%人还阅读了:
返回首页