标题:delphi编译报错too many actual parameters
只看楼主
hjhcw
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2021-8-28
 问题点数:0 回复次数:2 
delphi编译报错too many actual parameters
请教各位,如下代码在delphi7中编译报错:delphi编译报错too many actual parameters,如何解决?完整代码如下:(编译时报错提示在代码倒数第三排)
unit Main;

interface

uses
  Windows, SysUtils, Variants, Classes, Controls, Forms, ExtCtrls, dmGdzc,
  GDZCDJ, GDZCCX, GDZCZJ, GDZCBS, GDZCBX, GDZCCOmmon, ActnList, ActnMan, ActnCtrls,
  ToolWin, StdStyleActnCtrls;

type
  TMainForm = class(TForm)
    amMain: TActionManager;
    atbMain: TActionToolBar;
    acExit: TAction;
    acGDZCDJ: TAction;
    acGDZCCX: TAction;
    acGDZCZJ: TAction;
    acGDZCBS: TAction;
    Splitter: TSplitter;
    acGDZCBX: TAction;
    procedure FormCreate(Sender: TObject);
    procedure FormDestroy(Sender: TObject);
    procedure acGDZCDJExecute(Sender: TObject);
    procedure acGDZCCXExecute(Sender: TObject);
    procedure acGDZCZJExecute(Sender: TObject);
    procedure acGDZCBSExecute(Sender: TObject);
    procedure acExitExecute(Sender: TObject);
    procedure acGDZCBXExecute(Sender: TObject);
  private
    FGDZCDJ: TForm;
    FGDZCZJ: TForm;
    FGDZCBS: TForm;
    FGDZCCX: TForm;
    FGDZCBX: TForm;
    FdmGDZC: TdmGdzc;
  end;

var
  MainForm: TMainForm;

implementation

{$R *.DFM}

procedure TMainForm.FormCreate(Sender: TObject);
begin
  FGDZCBX := nil;  
  FGDZCDJ := nil;
  FGDZCZJ := nil;
  FGDZCBS := nil;
  FGDZCCX := nil;
  FdmGDZC := TdmGdzc.Create(nil);
end;

procedure TMainForm.FormDestroy(Sender: TObject);
begin
  FdmGDZC.Free;
end;

procedure TMainForm.acGDZCDJExecute(Sender: TObject);
begin
  if not Assigned(FGDZCDJ) then
    FGDZCDJ := TGDZCDJForm.Create(nil, FdmGDZC);
  FGDZCDJ.Show;
end;

procedure TMainForm.acGDZCZJExecute(Sender: TObject);
begin
  if not Assigned(FGDZCZJ) then
    FGDZCZJ := TGDZCZJForm.Create(nil, FdmGDZC);
  FGDZCZJ.Show;
end;

procedure TMainForm.acGDZCBSExecute(Sender: TObject);
begin
  if not Assigned(FGDZCBS) then
    FGDZCBS := TGDZCBSForm.Create(nil, FdmGDZC);
  FGDZCBS.Show;
end;

procedure TMainForm.acGDZCCXExecute(Sender: TObject);
begin
  if not Assigned(FGDZCCX) then
    FGDZCCX := TGDZCCXForm.Create(nil, FdmGDZC);
  FGDZCCX.Show;
end;

procedure TMainForm.acExitExecute(Sender: TObject);
begin
  if ConfirmDlg('是否退出?') = IDYes then Close;
end;

procedure TMainForm.acGDZCBXExecute(Sender: TObject);
begin
if not Assigned(FGDZCBX) then
    FGDZCBX := TGDZCBXForm.Create(nil, FdmGDZC);
  FGDZCBX.Show;
end;

end.
搜索更多相关主题的帖子: begin procedure end then Sender 
2021-08-28 12:56
victor_yang
Rank: 1
等 级:新手上路
帖 子:7
专家分:0
注 册:2021-9-6
得分:0 
FGDZCBX := TGDZCBXForm.Create(nil, FdmGDZC);
给2个参数太多了。
2021-09-08 13:46
supermay
Rank: 1
等 级:新手上路
威 望:1
帖 子:34
专家分:0
注 册:2004-10-3
得分:0 
TGDZCBXForm没有重载Create吧,你给了两个参数,应有一个create的重载的。

2021-10-20 10:51



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-506690-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.418990 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved