B
bearyan
Unregistered / Unconfirmed
GUEST, unregistred user!
各位,我想请教一个问题,我以下的程序段总是提示“形参和实参不一致”的错误,请问要如何修改?
我是Delphi初学者,请详细一点描述问题所在,谢谢!!!
以下是程序代码:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
Type
MyForm = Class(TForm)
MyButton : TButton;
end;
procedure NewWindowsOpen(var MainWindow : MyForm ;
SubWindow : MyForm ;
RelativeLeft : integer ;
RelativeTop : integer);
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
uses Unit2;
procedure NewWindowsOpen(var MainWindow : MyForm ;
SubWindow : MyForm ;
RelativeLeft : integer ;
RelativeTop : integer);
begin
SubWindow.Left := MainWindow.Left + RelativeLeft;
SubWindow.Top := MainWindow.Top + RelativeTop;
SubWindow.Show;
MainWindow.AlphaBlendValue:=150;
end;
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
NewWindowsOpen(Form1,Form2,20,50);
end;
end.
我是Delphi初学者,请详细一点描述问题所在,谢谢!!!
以下是程序代码:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
Type
MyForm = Class(TForm)
MyButton : TButton;
end;
procedure NewWindowsOpen(var MainWindow : MyForm ;
SubWindow : MyForm ;
RelativeLeft : integer ;
RelativeTop : integer);
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
uses Unit2;
procedure NewWindowsOpen(var MainWindow : MyForm ;
SubWindow : MyForm ;
RelativeLeft : integer ;
RelativeTop : integer);
begin
SubWindow.Left := MainWindow.Left + RelativeLeft;
SubWindow.Top := MainWindow.Top + RelativeTop;
SubWindow.Show;
MainWindow.AlphaBlendValue:=150;
end;
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
NewWindowsOpen(Form1,Form2,20,50);
end;
end.