【问题标题】:Outlook VSTO - disable AppointmentItem window while loading dataOutlook VSTO - 加载数据时禁用 AppointmentItem 窗口
【发布时间】:2020-06-23 15:02:36
【问题描述】:

我有一个为 Outlook 2016 开发的 Outlook VSTO 插件。每当打开新的会议窗口时,它都会加载一个用户控件。 UserControl 在启动时获取一些数据。我想禁用 UI,直到此数据加载完成。例如,不应允许用户在“收件人”/“主题”等中输入任何内容。理想情况下,显示一个显示“正在加载数据..”或类似内容的对话框。

我正在寻找类似于此处提到的内容:https://social.msdn.microsoft.com/Forums/vstudio/en-US/2cbf9c7c-f562-4028-9673-d8e5cdf0dc77/splash-screen-for-vsto-application?forum=vsto

谢谢 维克

【问题讨论】:

    标签: outlook outlook-addin


    【解决方案1】:

    看来您只需要设置Control.Enabled 属性,该属性设置一个指示控件是否可以响应用户交互的值。例如:

    // Add a GroupBox to a form and set some of its common properties.
    private void AddMyGroupBox()
    {
       // Create a GroupBox and add a TextBox to it.
       GroupBox groupBox1 = new GroupBox();
       TextBox textBox1 = new TextBox();
       textBox1.Location = new Point(15, 15);
       groupBox1.Controls.Add(textBox1);
    
       // Set the Text and Dock properties of the GroupBox.
       groupBox1.Text = "MyGroupBox";
       groupBox1.Dock = DockStyle.Top;
    
       // Disable the GroupBox (which disables all its child controls)
       groupBox1.Enabled = false;
    
       // Add the Groupbox to the form.
       this.Controls.Add(groupBox1);
    }
    

    【讨论】:

    • 谢谢尤金。但我正在考虑禁用 Outlook 控件,例如“收件人”、“主题”、“发送”按钮等,而不是我的加载项中的表单。
    • 您需要开发一个表单区域来替换检查器窗口中的默认 Outlook UI。
    • 没有简单的方法可以禁用内置控件。
    • 谢谢。会考虑的。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2022-11-04
    • 2017-08-17
    • 1970-01-01
    • 1970-01-01
    • 2017-11-04
    • 2016-10-11
    • 1970-01-01
    相关资源
    最近更新 更多