A
alaifu
Unregistered / Unconfirmed
GUEST, unregistred user!
(我是简化了问题问大侠们的)
procedure TForm1.Button1Click(Sender: TObject);
begin
ApdTapiDevice1.PlayWaveFile('check.wav')
end;
我运行上面得代码是行得通的,但运行下面的代码就提示undeclared indentifier:'Apdtapidevice1'还有Missing operator or semicolon.其中PlayWaveFile是第三方控件Apdtapidevice1的Methods.是不是还要在哪处另外对Apdtapidevice1进行声明呢??请教各位大侠..
---------------------------------------------------------------------
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, AdTapi, OoMisc, AdPort, MPlayer;
type
TForm1 = class(TForm)
Button1: TButton;
Button2: TButton;
ApdComPort1: TApdComPort;
ApdTapiDevice1: TApdTapiDevice;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure play(filename:string);
begin
ApdTapiDevice1.PlayWaveFile(filename);
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
play('check.wav');
end;
end.
procedure TForm1.Button1Click(Sender: TObject);
begin
ApdTapiDevice1.PlayWaveFile('check.wav')
end;
我运行上面得代码是行得通的,但运行下面的代码就提示undeclared indentifier:'Apdtapidevice1'还有Missing operator or semicolon.其中PlayWaveFile是第三方控件Apdtapidevice1的Methods.是不是还要在哪处另外对Apdtapidevice1进行声明呢??请教各位大侠..
---------------------------------------------------------------------
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, AdTapi, OoMisc, AdPort, MPlayer;
type
TForm1 = class(TForm)
Button1: TButton;
Button2: TButton;
ApdComPort1: TApdComPort;
ApdTapiDevice1: TApdTapiDevice;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure play(filename:string);
begin
ApdTapiDevice1.PlayWaveFile(filename);
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
play('check.wav');
end;
end.