Condividi tramite


InkOverlay.AttachedControl Property

InkOverlay.AttachedControl Property

Gets or sets the control to which the InkOverlay object is attached.

Definition

Visual Basic .NET Public Property AttachedControl As Control
C# public Control AttachedControl { get; set; }
Managed C++ public: __property Control* get_AttachedControl();
public: __property void set_AttachedControl(Control*);

Property Value

System.Windows.Forms.Control. The control to which the InkOverlay object is attached.

This property is read/write.

null Default. The InkOverlay object is not attached to a control.
System.Windows.Forms.Control The control to which the InkOverlay object is attached.

Exceptions

ArgumentException Leave Site: The control is not in the same process.
COMException Leave Site:
InvalidOperationException Leave Site: The InkOverlay object is collecting ink.
ObjectDisposedException Leave Site:

Remarks

The AttachedControl or Handle property must be set before the InkOverlay object can be enabled.

If the InkOverlay object is attached to a window handle, setting this property attaches the InkOverlay object to a control and clears the Handle property.

Note: The InkOverlay must be disabled before setting this property. To disable the InkOverlay, set the Enabled property to false. You can then set this property and re-enable the object by setting the Enabled property to true.

If you use the AttachedControl property and the Handle property in your application, you will get a security exception when you run the application in the Internet zone. This is because the Handle property is not valid in the partial trust environment of the Internet zone, so the Tablet PC operating system reverts to the AttachedControl property.

See Also