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 中找不到控制項時所發生的錯誤。

適用於