InkOverlay.TabletRemoved 事件
當 Tablet 物件從系統移除時發生。
命名空間: Microsoft.Ink
組件: Microsoft.Ink (在 Microsoft.Ink.dll 中)
語法
'宣告
Public Event TabletRemoved As InkCollectorTabletRemovedEventHandler
'用途
Dim instance As InkOverlay
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_OnTabletRemoved(ByVal sender As Object, ByVal e As InkCollectorTabletRemovedEventArgs)
Me.Is3DActive = New Tablets().IsPacketPropertySupported(PacketProperty.PitchRotation)
End Sub
private void Event_OnTabletRemoved(object sender, InkCollectorTabletRemovedEventArgs e)
{
this.Is3DActive = new Tablets().IsPacketPropertySupported(PacketProperty.PitchRotation);
}
在啟動時,InkOverlay 物件 (變數名稱為 mInkOverlay) 會註冊事件處理常式。
' register the TabletAdded and TabletRemoved event handlers
AddHandler mInkOverlay.TabletAdded, New InkCollectorTabletAddedEventHandler(AddressOf Event_OnTabletAdded)
AddHandler mInkOverlay.TabletRemoved, New InkCollectorTabletRemovedEventHandler(AddressOf Event_OnTabletRemoved)
// register the TabletAdded and TabletRemoved event handlers
mInkOverlay.TabletAdded += new InkCollectorTabletAddedEventHandler(Event_OnTabletAdded);
mInkOverlay.TabletRemoved += new InkCollectorTabletRemovedEventHandler(Event_OnTabletRemoved);
平台
Windows Vista
.NET Framework 和 .NET Compact Framework 並不支援各種平台的所有版本。如需支援平台版本的相關資訊,請參閱 .NET Framework 系統需求。
版本資訊
.NET Framework
支援版本:3.0