http://www.delphi2007.net/DelphiDB/html/delphi_20061222151309162.html
我用DELPHI和SQL SEVER做了一个系统,现在一个窗口做了一个
帮助按键,我想点它就能打开一个名为help.txt的使用帮助文档,代码要怎么写?
麻烦高手指教 (是不是begin和end中间要加什么代码?)
procedure Tmainform.N11Click(Sender: TObject);
begin
end;
shelllexecute
这个是什么?高手能写具体点吗?
uses shellapi;
ShellExecute(self.Handle, 'Open', 'C:\aa.txt', Nil, Nil, SW_SHOWNORMAL);
我加了
uses shellapi;
ShellExecute(self.Handle, 'Open', 'C:\help.txt', Nil, Nil, SW_SHOWNORMAL);
这样会报错啊
[Error] Unit3.pas(245): Statement expected but 'USES' found
[Error] Unit3.pas(246): Undeclared identifier: 'ShellExecute'
[Fatal Error] Project1.dpr(26): Could not compile used unit 'Unit3.pas'
没见到更。。。
implementation
uses shellapi;
{$R *.dfm}
procedure Tmainform.N11Click(Sender: TObject);
begin
ShellExecute(self.Handle, 'Open', 'C:\aa.txt', Nil, Nil, SW_SHOWNORMAL);
end;
本文介绍如何在Delphi中通过调用ShellAPI的ShellExecute函数来打开本地的帮助文档,解决在点击帮助按钮时无法正确打开指定txt文件的问题。文章提供了具体的代码示例,包括正确的uses语句和ShellExecute函数的调用方式。
5503

被折叠的 条评论
为什么被折叠?



