【问题标题】:How to display file properties dialog security tab from c#如何从 C# 显示文件属性对话框安全选项卡
【发布时间】:2015-06-02 17:51:17
【问题描述】:

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

见下图。

提前谢谢你。

【问题讨论】:

标签: c# .net windows


【解决方案1】:

添加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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-04-29
    • 2011-12-18
    • 2023-04-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-11-08
    相关资源
    最近更新 更多