Delphi 调用viewer-Windows10 图像浏览器


本文整理自网络,侵删。

 

uses  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;


procedure TForm1.FormCreate(Sender: TObject);
begin
  ShellExecute(0,'open','cmd.exe',Pchar('/c rundll32 "'+GetSpecialPath($26)+'\Windows Photo Viewer\PhotoViewer.dll",ImageView_Fullscreen C:\Users\haokucn\Desktop\QQ图片20191012161522.png'),nil,SW_HIDE);

end;

相关阅读 >>

Delphi代码实现窗口最小化,最大化,关闭消息发送

Delphi 利用51.la统计程序使用量

Delphi 获取当前输入法

Delphi自带的indy控件实现md5加密

Delphi 获取本机 hostname ip address

Delphi运行时的问题,cannot focus a disabled or invisible window!

Delphi'控件的相对坐标与屏幕坐标转换

Delphi的一些开发技巧和方法

Delphi 写日志函数

Delphi 10 seattle中录制音频

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



打赏

取消

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

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

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

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

评论

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