小问题,在Delphi中怎样用winAPI函数SHELLEXECUTE调用文件 shellexecute(handle,'open','c:\windows\desktop\aa.chm','','',sW_show); 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 function ShellExecute(hWnd: HWND; Operation, FileName, Parameters, Directory: PChar; ShowCmd: Integer): HINST; stdcall;返回值 非零表示成功,零表示失败。会设置GetLastError 参数表 参数 类型及说明 hwnd 指定一个窗口的句柄,有时候,windows程序有必要在创建自己的主窗口 前显示一个消息框 Operation 指定字串“open”来打开FlieName文档, 或指定“Print”来打印它 FileName 想用关联程序打印或打开一个程序名或文件名 Parameters 如FlieName是可执行文件,则这个字串包含传递给执行程序的参数 Directory 想使用的完整路径 ShowCmd 定义了如何显示启动程序的常数值。 参考ShowWindow函数的nCmdShow参数 编译都通不过,请指教!!后面不要external 'Shell32.DLL';吗?? 这个就可以,在 use 中包含 ShellAPI/********************************************************/unit Unit1;interfaceuses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs , shellapi, StdCtrls;type TForm1 = class(TForm) Button1: TButton; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end;var Form1: TForm1;implementation{$R *.DFM}procedure TForm1.Button1Click(Sender: TObject);begin shellexecute(handle,pchar('open'),pchar('E:\qmp\exmp\usechm\hubdog.chm'),nil,nil,sw_show);end;end. 请大家帮忙看看好吗? 程序运行时如何让窗口总在最前问题 我以前 做ASP现在要 做delphi大家 给点意见哦 !!!!!!! 各位大侠,大姐,大哥 救命 看看出现什么问题了-我是超级菜鸟-在线等待 如何获取条码扫描器扫描返回的字符串 10054问题 急,急,急,!!!!!!!!!!!!! delphi for php 现在支持中文了吗? 如何从指定的剪贴板向dxDBGrid中拷贝数据? 李维的书中关于MTS的例子的错误 网络教育软件前景怎么样 请教在Delphi 3中的一个数组问题!
Directory: PChar; ShowCmd: Integer): HINST; stdcall;
返回值
非零表示成功,零表示失败。会设置GetLastError
参数表 参数 类型及说明
hwnd 指定一个窗口的句柄,有时候,windows程序有必要在创建自己的主窗口
前显示一个消息框
Operation 指定字串“open”来打开FlieName文档,
或指定“Print”来打印它
FileName 想用关联程序打印或打开一个程序名或文件名
Parameters 如FlieName是可执行文件,则这个字串包含传递给执行程序的参数
Directory 想使用的完整路径
ShowCmd 定义了如何显示启动程序的常数值。
参考ShowWindow函数的nCmdShow参数
后面不要external 'Shell32.DLL';吗??
/********************************************************/
unit Unit1;interfaceuses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs
, shellapi, StdCtrls;type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.DFM}procedure TForm1.Button1Click(Sender: TObject);
begin
shellexecute(handle,pchar('open'),pchar('E:\qmp\exmp\usechm\hubdog.chm'),nil,nil,sw_show);
end;end.