Share via


ControlNotFoundException 类

定义

表示在导入的表单区域的 Microsoft.Vbe.Interop.Forms.UserForm 中找不到控件时发生的错误。

public ref class ControlNotFoundException sealed : Microsoft::VisualStudio::Tools::Applications::Runtime::RuntimeException
[System.Diagnostics.DebuggerNonUserCode]
[System.Serializable]
public sealed class ControlNotFoundException : Microsoft.VisualStudio.Tools.Applications.Runtime.RuntimeException
[<System.Diagnostics.DebuggerNonUserCode>]
[<System.Serializable>]
type ControlNotFoundException = class
    inherit RuntimeException
Public NotInheritable Class ControlNotFoundException
Inherits RuntimeException
继承
ControlNotFoundException
属性

注解

如果导入在 Microsoft Office Outlook 中设计的窗体区域,如果删除或修改导入的 Outlook 窗体存储 (*.ofs) 文件中描述的控件名称,则会发生此异常。

可以使用 Outlook 中的设计器在导入的窗体区域中添加、删除或更改控件。 执行此操作之前,请备份添加到窗体区域代码文件的所有代码。 然后,在 Outlook 中打开 .ofs 文件,修改窗体区域并保存所做更改。 使用 “新建 Outlook 窗体区域 ”向导导入修改后的 .ofs 文件。 然后可将代码粘贴到新的窗体区域代码文件中。

构造函数

ControlNotFoundException()

初始化 ControlNotFoundException 类的新实例。

ControlNotFoundException(Exception)

表示在导入的表单区域的 Microsoft.Vbe.Interop.Forms.UserForm 中找不到控件时发生的错误。

ControlNotFoundException(String)

使用导入的表单区域的 Microsoft.Vbe.Interop.Forms.UserForm 中未找到的控件的名称初始化 ControlNotFoundException 的新实例。

ControlNotFoundException(String, Exception)

表示在导入的表单区域的 Microsoft.Vbe.Interop.Forms.UserForm 中找不到控件时发生的错误。

属性

Identifier

获取导入的表单区域的 Microsoft.Vbe.Interop.Forms.UserForm 中未找到的控件的名称。

方法

GetObjectData(SerializationInfo, StreamingContext)

表示在导入的表单区域的 Microsoft.Vbe.Interop.Forms.UserForm 中找不到控件时发生的错误。

适用于