- 人气:
- 放大
- 缩小
- 二维码
- 赞赏
delphi ShellExecute打开文件另类用法
if StrLen(PChar(filePathEdit.Text)) > 0 then
begin
if ShellExecute(Handle, 'open', PChar(filePathEdit.Text), nil, nil, SW_SHOWNORMAL) <= 32 then
begin
//www.delphitop.com
MessageDlg('无法执行请求的操作.' + #13#10 +'确保键入的名称正确.', mtError, [mbOK], 0);
Exit;
end;
Close;
end;