共用方式為


InkCollector.TabletRemoved 事件

Tablet 物件從系統移除時發生。

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

語法

'宣告
Public Event TabletRemoved As InkCollectorTabletRemovedEventHandler
'用途
Dim instance As InkCollector
Dim handler As InkCollectorTabletRemovedEventHandler

AddHandler instance.TabletRemoved, handler
public event InkCollectorTabletRemovedEventHandler TabletRemoved
public:
 event InkCollectorTabletRemovedEventHandler^ TabletRemoved {
    void add (InkCollectorTabletRemovedEventHandler^ value);
    void remove (InkCollectorTabletRemovedEventHandler^ value);
}
/** @event */
public void add_TabletRemoved (InkCollectorTabletRemovedEventHandler value)
/** @event */
public void remove_TabletRemoved (InkCollectorTabletRemovedEventHandler value)
JScript 不支援事件。

備註

事件處理常式會收到 InkCollectorTabletRemovedEventArgs 型別的引數,其中包含這個事件的相關資料。

在建立 InkCollectorTabletRemovedEventHandler 委派時,您要識別處理事件的方法。若要使事件與您的事件處理常式產生關聯,請將委派的執行個體加入至事件。除非您移除委派,否則每當事件發生時就會呼叫事件處理常式。基於效能考量,相關事件的預設是關閉的,但會在您加入事件處理常式時自動開啟。

範例

如果 Tablets 集合中的每個 Tablet 物件都支援 PitchRotation 屬性,則這個範例中的事件處理常式會啟動 3D 數位板專用的特殊應用程式功能。

Private Sub Event_OnTabletAdded(ByVal sender As Object, ByVal e As InkCollectorTabletAddedEventArgs)
    Me.Is3DActive = New Tablets().IsPacketPropertySupported(PacketProperty.PitchRotation)
End Sub
private void Event_OnTabletAdded(object sender, InkCollectorTabletAddedEventArgs e)
{
    this.Is3DActive = new Tablets().IsPacketPropertySupported(PacketProperty.PitchRotation);
}

在啟動時,InkCollector 物件 (mInkCollector) 會註冊事件處理常式。

' register the TabletAdded and TabletRemoved event handlers
AddHandler mInkCollector.TabletAdded, New InkCollectorTabletAddedEventHandler(AddressOf Event_OnTabletAdded)
AddHandler mInkCollector.TabletRemoved, New InkCollectorTabletRemovedEventHandler(AddressOf Event_OnTabletRemoved)
// register the TabletAdded and TabletRemoved event handlers
mInkCollector.TabletAdded += new InkCollectorTabletAddedEventHandler(Event_OnTabletAdded);
mInkCollector.TabletRemoved += new InkCollectorTabletRemovedEventHandler(Event_OnTabletRemoved);

平台

Windows Vista

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

版本資訊

.NET Framework

支援版本:3.0

請參閱

參考

InkCollector 類別

InkCollector 成員

Microsoft.Ink 命名空間

InkCollectorTabletRemovedEventArgs

Tablet

InkCollector.TabletAdded