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

2024-03-02

这个帖子:如何从 C# 显示文件的“属性”对话框? https://stackoverflow.com/questions/1936682/how-do-i-display-a-files-properties-dialog-from-c描述了如何显示文件的“属性”对话框,我想知道是否可以使用相同的方法但将打开的选项卡设置为安全?来自 C# 代码。

见下图。

先感谢您。


Add info.lpParameters = "Security";显示安全选项卡。

Or 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);
    }

参考:显示文件的属性页并导航到选项卡 https://stackoverflow.com/questions/12213903/to-show-the-properties-page-of-a-file-and-navigate-to-a-tab

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

如何从 C# 显示文件属性对话框安全选项卡 的相关文章

随机推荐