共用方式為


PenInputPanel.AttachedEditWindow 屬性

已取代。取得或設定其中附加 PenInputPanel 物件的視窗控制代碼。 PenInputPanel 已被 Microsoft.Ink.TextInput 取代。

命名空間:  Microsoft.Ink
組件:  Microsoft.Ink (在 Microsoft.Ink.dll 中)

語法

'宣告
Public Property AttachedEditWindow As IntPtr
'用途
Dim instance As PenInputPanel
Dim value As IntPtr

value = instance.AttachedEditWindow

instance.AttachedEditWindow = value
public IntPtr AttachedEditWindow { get; set; }
public:
property IntPtr AttachedEditWindow {
    IntPtr get ();
    void set (IntPtr value);
}
/** @property */
public IntPtr get_AttachedEditWindow()
/** @property */
public  void set_AttachedEditWindow(IntPtr value)
public function get AttachedEditWindow () : IntPtr
public function set AttachedEditWindow (value : IntPtr)

屬性值

型別:System.IntPtr
其中附加 PenInputPanel 物件的視窗控制代碼。

備註

其中附加 PenInputPanel 物件的物件或控制項,可能偶爾會移至擁有新視窗控制代碼的視窗中。例如,您可能會更新應用程式,並且變更其中附加物件或控制項的視窗。在這類情況下,如果 PenInputPanel 物件的該執行個體之 AttachedEditControl 屬性設為該物件或控制項,則 AttachedEditWindow 屬性會在附加控制項的視窗控制代碼變更時自動更新。如果未設定 AttachedEditControl 屬性,則您必須在附加物件或控制項的視窗控制代碼變更時,更新 PenInputPanel 物件的視窗控制代碼。

AttachedEditControl 和 AttachedEditWindow 為獨立屬性。因此設定其中一個屬性不一定會更新另一個。請使用您原本用來附加 PenInputPanel 物件至控制項或視窗的屬性。

ms582240.alert_security(zh-tw,VS.90).gif安全性注意事項:

如果在部分信任的情況下使用,除了 PenInputPanel 所需的權限之外,這個屬性還需要 SecurityPermissionFlag.AllFlags (英文) 權限。如需詳細資訊,請參閱Security and Trust

範例

這個 C# 範例會建立 PenInputPanel 物件 (thePenInputPanel),並且透過設定 AttachedEditWindow 屬性將它附加至 InkEdit 控制項 (theInkEdit)。

[C#]

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

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

這個 Microsoft® Visual Basic® .NET 範例會建立 PenInputPanel 物件 (thePenInputPanel),並且透過設定 AttachedEditWindow 屬性將它附加至 InkEdit 控制項 (theInkEdit)。

[Visual Basic]

' 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

平台

Windows Vista

.NET Framework 和 .NET Compact Framework 並不支援各種平台的所有版本。如需支援平台版本的相關資訊,請參閱 .NET Framework 系統需求

版本資訊

.NET Framework

支援版本:3.0

請參閱

參考

PenInputPanel 類別

PenInputPanel 成員

Microsoft.Ink 命名空間

PenInputPanel.AttachedEditControl