共用方式為


InkCollector 建構函式 (IntPtr)

初始化 InkCollector 類別的新執行個體,並使它與視窗控制代碼產生關聯。

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

語法

'宣告
Public Sub New ( _
    handle As IntPtr _
)
'用途
Dim handle As IntPtr

Dim instance As New InkCollector(handle)
public InkCollector(
    IntPtr handle
)
public:
InkCollector(
    IntPtr handle
)
public InkCollector(
    IntPtr handle
)
public function InkCollector(
    handle : IntPtr
)

參數

備註

新建立的 InkCollector 物件可以在指定的視窗介面上收集筆墨。

除了畫筆之外,還可以使用滑鼠進行輸入。

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

如果在部分信任的情況下使用,除了 InkCollector 所需的權限之外,這個建構函式還需要 SecurityPermissionFlag.UnmanagedCode 權限。如需詳細資訊,請參閱Security And Trust

範例

這個 C# 範例會初始化 InkCollector 物件 (theInkCollector) 的新執行個體,再使它與表單的視窗控制代碼產生關聯,然後加以啟用。

using System;
using System.Drawing;
using System.Windows.Forms;
using Microsoft.Ink;

class MinimumInkApp : System.Windows.Forms.Form
{
    InkCollector theInkCollector;

    public MinimumInkApp()
    {
        // Initialize the form.
        this.Text = "Minimum Ink Application";

        // Create and enable theInkCollector.
        theInkCollector = new InkCollector(Handle);
        theInkCollector.Enabled = true;
    }

    public static void Main()
    {
        Application.Run(new MinimumInkApp());
    }
}

這個 Microsoft Visual Basic .NET 範例會初始化 InkCollector 物件 (theInkCollector) 的新執行個體,再使它與表單的視窗控制代碼產生關聯,然後加以啟用。

Imports System.Windows.Forms
Imports Microsoft.Ink
Public Class MinimumInkApp
    Inherits System.Windows.Forms.Form

    Dim theInkCollector As InkCollector

    Public Sub New()
        MyBase.New()
        'Initialize the form.
        Me.Text = "Minimum Ink Application"
        'Create and enable theInkCollector.
        theInkCollector = New InkCollector(Handle)
        theInkCollector.Enabled = True
    End Sub

    Public Shared Sub Main()
        Application.Run(New MinimumInkApp())
    End Sub
End Class

平台

Windows Vista

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

版本資訊

.NET Framework

支援版本:3.0

請參閱

參考

InkCollector 類別

InkCollector 成員

InkCollector 多載

Microsoft.Ink 命名空間

InkCollector