Costruttore DynamicRenderer (IntPtr)
Aggiornamento: novembre 2007
Inizializza una nuova istanza della classe DynamicRenderer.
Spazio dei nomi: Microsoft.StylusInput
Assembly: Microsoft.Ink (in Microsoft.Ink.dll)
Sintassi
'Dichiarazione
Public Sub New ( _
handle As IntPtr _
)
'Utilizzo
Dim handle As IntPtr
Dim instance As New DynamicRenderer(handle)
public DynamicRenderer(
IntPtr handle
)
public:
DynamicRenderer(
IntPtr handle
)
public DynamicRenderer(
IntPtr handle
)
public function DynamicRenderer(
handle : IntPtr
)
Parametri
- handle
Tipo: System.IntPtr
Controllo sul quale vengono visualizzati i dati della penna del Tablet PC.
Note
Anche se generalmente gli oggetti DynamicRenderer e RealTimeStylus vengono inizializzati con lo stesso handle della finestra o dell'oggetto Control, è possibile inizializzarli con oggetti diversi. Un esempio di questa possibilità è rappresentato dal caso in cui si desideri eseguire il rendering dell'input penna in una finestra diversa rispetto al punto in cui viene generato il pacchetto del tratto.
Esempi
In questo esempio C# viene illustrato il gestore dell'evento Load per un form che implementa l'interfaccia IStylusAsyncPlugin. Una nuova istanza di un oggetto DynamicRenderer, theDynamicRenderer, e un oggetto RealTimeStylus, theRealTimeStylus vengono inizializzati, associati al form e abilitati.
using Microsoft.StylusInput;
// ...
private RealTimeStylus theRealTimeStylus;
private DynamicRenderer theDynamicRenderer;
// ...
private void InkCollection_Load(object sender, System.EventArgs e)
{
theDynamicRenderer = new DynamicRenderer(Handle);
theRealTimeStylus = new RealTimeStylus(this, true);
// Add the dynamic renderer to the synchronous plugin notification chain.
// Synchronous notifications occur on the pen thread.
theRealTimeStylus.SyncPluginCollection.Add(theDynamicRenderer);
// Add the form to the asynchronous plugin notification chain. This plugin
// will be used to collect stylus data into an ink object. Asynchronous
// notifications occur on the UI thread.
theRealTimeStylus.AsyncPluginCollection.Add(this);
// Enable the real time stylus and the dynamic renderer
theRealTimeStylus.Enabled = true;
theDynamicRenderer.Enabled = true;
}
In questo esempio Microsoft Visual Basic .NET viene illustrato il gestore dell'evento Load per un form che implementa l'interfaccia IStylusAsyncPlugin. Una nuova istanza di un oggetto DynamicRenderer, theDynamicRenderer, e un oggetto RealTimeStylus, theRealTimeStylus vengono inizializzati, associati al form e abilitati.
Imports Microsoft.StylusInput
' ...
Private theRealTimeStylus As RealTimeStylus
Private theDynamicRenderer As DynamicRenderer
' ...
Private Sub InkCollector_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) _
Handles MyBase.Load
theDynamicRenderer = New DynamicRenderer(Handle)
theRealTimeStylus = New RealTimeStylus(Me, True)
' Add the dynamic renderer to the synchronous plugin notification chain.
' Synchronous notifications occur on the pen thread.
theRealTimeStylus.SyncPluginCollection.Add(theDynamicRenderer)
' Add the form to the asynchronous plugin notification chain. This plugin
' will be used to collect stylus data into an ink object. Asynchronous
' notifications occur on the UI thread.
theRealTimeStylus.AsyncPluginCollection.Add(Me)
' Enable the real time stylus and the dynamic renderer
theRealTimeStylus.Enabled = True
theDynamicRenderer.Enabled = True
End Sub
Piattaforme
Windows Vista, Windows XP SP2, Windows Server 2003
.NET Framework e .NET Compact Framework non supportano tutte le versioni di ciascuna piattaforma. Per un elenco delle versioni supportate, vedere Requisiti di sistema di .NET Framework.
Informazioni sulla versione
.NET Framework
Supportato in: 3.0