c# - 如何从 C# 显示文件属性对话框安全选项卡

标签 c# .net windows

这篇文章:How do I display a file's Properties dialog from C#?描述了如何显示文件的属性对话框,我想知道是否可以使用相同的方法但将打开的选项卡设置为安全?来自 C# 代码。

见下图。

Folder Properties Security Tab

提前致谢。

最佳答案

添加 info.lpParameters = "Security"; 以显示安全选项卡。

info.lpParameters = "Details"; 显示详细信息选项卡。

现在 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

关于c# - 如何从 C# 显示文件属性对话框安全选项卡,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30603139/

相关文章:

c# - 编写 XSLT 样式表 header

c# - 访问修饰符 C#

c# - 如何在统一的两个游戏对象之间平滑地线性平移

python - 将带有通配符的参数传递给 Python 脚本

windows - 如何将具有每像素 alpha 的位图绘制到控件的 Canvas 上?

c# - 如何在多行文本框中制作命令行

javascript - 如何将 JavaScript 变量传递给服务器端方法

c# - 如何以编程方式检索 Excel 工作表中的页数?

.net - Log4net-如何在运行时查找附加程序及其属性?

c# - 文件比较实用程序