声明:未经允许不得转载,转载时请标注来源;禁止用作商业及其他衍生目的。
有误请指正,侵权请联系删除。有更好的方法也请联系我
Add-Type @"
using System;
using System.Runtime.InteropServices;
using System.Text;
public class YZX
{
[DllImport(@"$env:ProgramFiles\Windows Photo Viewer\PhotoViewer.dll",SetLastError = true,CharSet = CharSet.Unicode)]
public static extern void imageview_fullscreenW(IntPtr b,string x,string u,string y);
}
"@ -Language CSharp
[YZX]::imageview_fullscreenW(0,$null,"图片的路径",$null)
注:如若输入不存在的路径,则对话框不能发起;非图片文件则不能正常展示。
展示: