procedure TMainForm.MenuHelpClick(Sender: TObject);
var shelpfile:string;
begin
shelpFile:=ExtractFilePath(Application.ExeName)+'Help\carsale.chm';
ShellExecute(0,'open',pchar(shelpfile),nil,nil,SW_SHOWNORMAL);
end;编译显示
[Error] Main.pas(71): Undeclared identifier: 'ShellExecute'
shellexecute调用还要声明什么啊?我在xp下用D7开发.
我才接触api编程.
我上网找了几个api的介绍,好像都是针对vb的,哪里有针对Delphi的下啊?
var shelpfile:string;
begin
shelpFile:=ExtractFilePath(Application.ExeName)+'Help\carsale.chm';
ShellExecute(0,'open',pchar(shelpfile),nil,nil,SW_SHOWNORMAL);
end;编译显示
[Error] Main.pas(71): Undeclared identifier: 'ShellExecute'
shellexecute调用还要声明什么啊?我在xp下用D7开发.
我才接触api编程.
我上网找了几个api的介绍,好像都是针对vb的,哪里有针对Delphi的下啊?
WinExec('调用的程序名不过',SW_SHOW);
不过这样的调用都是要将调用的程序显示出来,也就是说如果调用一个命令行的程序时,会弹出命令行窗口,如果你想要程序后台执行,可以用CreateProcess()来调用,具体请看DHLP.