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实现注册表的操作

Delphi中如何用image控件显示网络图片

Delphi tdictionary使用范例

winapi 字符及字符串函数(6): ischaralphanumeric - 是否是个文字(字母或数字)

Delphi of 打坐与普通攻击calll调用

Delphi正则表达式

Delphi idhttp中get与post的区别

Delphi 为richedit设置行号

Delphi stringgrid 实例4 本例功能: 1、给每个单元格赋值 2、调整当前单元格位置:上下左右;

Delphi中始终用webbrowser打开网页

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



打赏

取消

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

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

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

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

评论

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