InkCollector.AttachedControl Property

InkCollector.AttachedControl Property

Gets or sets the control to which the InkCollector 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 InkCollector object is attached.

This property is read/write.

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

Exceptions

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

Remarks

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

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

Note: The InkCollector must be disabled before setting this property. To disable the InkCollector, 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