RealTimeStylus Constructor (IntPtr, Boolean)
Initializes a new instance of the RealTimeStylus class, attaches it to the specified window, and specifies whether or not to use the mouse for input.
Namespace: Microsoft.StylusInput
Assembly: Microsoft.Ink (in Microsoft.Ink.dll)
Syntax
'Declaration
Public Sub New ( _
handle As IntPtr, _
useMouseForInput As Boolean _
)
'Usage
Dim handle As IntPtr
Dim useMouseForInput As Boolean
Dim instance As New RealTimeStylus(handle, _
useMouseForInput)
public RealTimeStylus(
IntPtr handle,
bool useMouseForInput
)
public:
RealTimeStylus(
IntPtr handle,
bool useMouseForInput
)
public function RealTimeStylus(
handle : IntPtr,
useMouseForInput : boolean
)
Parameters
handle
Type: System.IntPtrThe handle of the window to which to attach the RealTimeStylus object. If this parameter is set to 0, the constructor throws an exception.
useMouseForInput
Type: System.BooleanA value that indicates whether to use the mouse for tablet input.
Value
Meaning
true
The mouse may be used for tablet input.
false
The mouse may not be used for tablet input.
Remarks
For new RealTimeStylus objects, ink collection is initially disabled and the input region is set to the bounds of the window to which the RealTimeStylus object is attached. For more information, see the Enabled and WindowInputRectangle properties.
Examples
This C# example is a snippet from a form's Load event handler, which creates a RealTimeStylus object attached to the Handle of the Panel object, thePanel. The mouse is not used for tablet input, but all other Tablet objects are.
using Microsoft.Ink;
using Microsoft.StylusInput;
using Microsoft.StylusInput.PluginData;
// ...
// The panel where the tablet pen data is collected.
private System.Windows.Forms.Panel thePanel;
// The form's Load event handler.
private void theForm_Load(object sender, System.EventArgs e)
{
// ...
// Create the RealTimeStylus object.
this.theRealTimeStylus = new RealTimeStylus(this.thePanel.Handle, false);
// ...
}
Platforms
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Version Information
.NET Framework
Supported in: 3.0