这篇文章:How do I display a file’s Properties dialog from C#?描述了如何显示文件的属性对话框,我想知道是否可以使用相同的方法但是将打开的选项卡设置为securety?来自C#代码.
见下图.
先感谢您.
解决方法:
添加info.lpParameters =“安全”;显示安全选项卡.
或者info.lpParameters =“详细信息”;显示详细信息选项卡.
现在ShowFileProperties方法是:
public static bool ShowFileProperties(string Filename)
{
SHELLEXECUTEINFO info = new SHELLEXECUTEINFO();
info.cbSize = System.Runtime.InteropServices.Marshal.SizeOf(info);
info.lpVerb = "properties";
info.lpFile = Filename;
info.lpParameters = "Security";
info.nShow = SW_SHOW;
info.fMask = SEE_MASK_INVOKEIDLIST;
return ShellExecuteEx(ref info);
}
参考:To show the properties page of a file and navigate to a tab