Compartir a través de


PenInputPanel.AttachedEditWindow Property

PenInputPanel.AttachedEditWindow Property

Gets or sets the window handle that the PenInputPanel object is attached to.

Definition

Visual Basic .NET Public Property AttachedEditWindow As IntPtr
C# public IntPtr AttachedEditWindow { get; set; }
Managed C++ public: __property IntPtr* get_AttachedEditWindow();
public: __property void set_AttachedEditWindow(IntPtr*);

Property Value

System.IntPtr. The window handle that the PenInputPanel object is attached to.

This property is read/write. This property has no default value.

Exceptions

COMException Leave Site:
ObjectDisposedException Leave Site:

Remarks

The object or control that a PenInputPanel object is attached to may, on occasion, be moved to a window with a new window handle. For example, you may update an application and change the window that an object or control is attached to. In cases such as this, if the AttachedEditControl property for that instance of the PenInputPanel object is set to the object or control, then the AttachedEditWindow property is updated automatically when the window handle of the attached control changes. If the AttachedEditControl property is not set, then you must update the window handle for the PenInputPanel object when the window handle for the attached object or control changes.

AttachedEditControl and AttachedEditWindow are independent properties. Setting one does not necessarily update the other. Use the property that you originally used to attach the PenInputPanel object to a control or window.

Examples

[C#]

This C# example creates a PenInputPanel object, thePenInputPanel, and attaches it to an InkEdit control, theInkEdit, by setting the AttachedEditWindow property.

// Declare and create a PenInputPanel
PenInputPanel thePenInputPanel = new PenInputPanel();

// Attach the PenInputPanel to the window handle of an InkEdit control
thePenInputPanel.AttachedEditWindow = theInkEdit.Handle;

[Visual Basic .NET]

This Microsoft® Visual Basic® .NET example creates a PenInputPanel object, thePenInputPanel, and attaches it to an InkEdit control, theInkEdit, by setting the AttachedEditWindow property.

' Declare a new PenInputPanel object
Dim thePenInputPanel As PenInputPanel

' Create the PenInputPanel
Set thePenInputPanel = New PenInputPanel

' Attach the PenInputPanel to an InkEdit control
thePenInputPanel.AttachedEditWindow = theInkEdit.hWnd

See Also