delphi 调用系统图片查看器


本文整理自网络,侵删。

 
uses Windows, ShlObj, ShellAPI;

function GetSpecialPath(CSIDL: word): string;
  var
  s: string;
begin
  SetLength(s, MAX_PATH);
  if not SHGetSpecialFolderPath(0, PChar(s), CSIDL, true) then s:='';
  Result:=PChar(s);
end;

begin
ShellExecute(0,'open','cmd.exe',Pchar('/c rundll32 "'+GetSpecialPath($26)+'\Windows Photo Viewer\PhotoViewer.dll",ImageView_Fullscreen G:\xxxx\ '+ParamStr(1)),nil,SW_HIDE);

//ShellExecute(0,'open','cmd.exe',Pchar('/c rundll32 "'+GetSpecialPath($26)+'\Windows Photo Viewer\PhotoViewer.dll",ImageView_Fullscreen '+ParamStr(1)),nil,SW_HIDE);
end.

相关阅读 >>

Delphi里的compile和build都能产生可执行文件,有什么区别啊?

Delphi tclientdataset用法详解

Delphi xe5 android应用程序获取电池信息

Delphi png 图片的十六进制字符流

Delphi指针的定义和取值

webbrowser点击没有id和name的按钮或链接

Delphi 检查用户输入必须是汉字串

Delphi repeat until 运用

Delphi xe android 调试错误:connection closed gracefully

Delphi 2010/xe下隐藏程序在系统任务栏的图标

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...