CannotRemoveControlException Class

 

The exception that is thrown when code tries to remove a host control or Windows Forms control that was added to a document at design time.

Namespace:   Microsoft.Office.Tools
Assembly:  Microsoft.Office.Tools.v4.0.Framework (in Microsoft.Office.Tools.v4.0.Framework.dll)

System.Object
  System.Exception
    Microsoft.VisualStudio.Tools.Applications.Runtime.RuntimeException
      Microsoft.Office.Tools.CannotRemoveControlException

[SerializableAttribute]
[DebuggerNonUserCodeAttribute]
[SecurityPermissionAttribute(SecurityAction.Demand, Unrestricted = true)]
[SecurityPermissionAttribute(SecurityAction.InheritanceDemand, 
	Unrestricted = true)]
public sealed class CannotRemoveControlException : RuntimeException

NameDescription
System_CAPS_pubmethodCannotRemoveControlException()

This API supports the product infrastructure and is not intended to be used directly from your code.

System_CAPS_pubmethodCannotRemoveControlException(Exception)

This API supports the product infrastructure and is not intended to be used directly from your code.

System_CAPS_pubmethodCannotRemoveControlException(String)

This API supports the product infrastructure and is not intended to be used directly from your code.

System_CAPS_pubmethodCannotRemoveControlException(String, Exception)

This API supports the product infrastructure and is not intended to be used directly from your code.

System_CAPS_pubmethodCannotRemoveControlException(String, String)

This API supports the product infrastructure and is not intended to be used directly from your code.

System_CAPS_pubmethodCannotRemoveControlException(String, String, Exception)

This API supports the product infrastructure and is not intended to be used directly from your code.

NameDescription
System_CAPS_pubpropertyData

(Inherited from Exception.)

System_CAPS_pubpropertyHelpLink

(Inherited from Exception.)

System_CAPS_pubpropertyHResult

(Inherited from Exception.)

System_CAPS_pubpropertyInnerException

(Inherited from Exception.)

System_CAPS_pubpropertyMessage

(Inherited from Exception.)

System_CAPS_pubpropertySource

(Inherited from Exception.)

System_CAPS_pubpropertyStackTrace

(Inherited from Exception.)

System_CAPS_pubpropertyTargetSite

(Inherited from Exception.)

NameDescription
System_CAPS_pubmethodEquals(Object)

(Inherited from Object.)

System_CAPS_pubmethodGetBaseException()

(Inherited from Exception.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetObjectData(SerializationInfo, StreamingContext)

(Inherited from Exception.)

System_CAPS_pubmethodGetType()

(Inherited from Exception.)

System_CAPS_pubmethodToString()

(Inherited from Exception.)

If you add host controls and Windows Forms controls to documents that are part of document-level customizations at design time, you cannot delete these controls at run time. For more information, see Adding Controls to Office Documents at Run Time.

This exception can be thrown by the Visual Studio Tools for Office runtime if you call one of the following methods to delete a control that was added at design time:

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: