Bagikan melalui


InkCollector.SetAllTabletsMode Method (Boolean)

Sets the InkCollector object to collect ink from any tablet attached to the Tablet PC, and optionally the mouse.

Namespace:  Microsoft.Ink
Assembly:  Microsoft.Ink (in Microsoft.Ink.dll)

Syntax

'Declaration
Public Sub SetAllTabletsMode ( _
    useMouseForInput As Boolean _
)
'Usage
Dim instance As InkCollector 
Dim useMouseForInput As Boolean

instance.SetAllTabletsMode(useMouseForInput)
public void SetAllTabletsMode(
    bool useMouseForInput
)
public:
void SetAllTabletsMode(
    bool useMouseForInput
)
public function SetAllTabletsMode(
    useMouseForInput : boolean
)

Parameters

  • useMouseForInput
    Type: System.Boolean

    The Boolean value that indicates whether to use the mouse as an input device.

    true if in addition to the pen, the mouse is used for input.

    false if the mouse cannot be used for input.

Remarks

This is the default mode for an InkCollector object. To allow the InkCollector object to collect ink from only one tablet, call the SetSingleTabletIntegratedMode method.

Note

The InkCollector object must be disabled before calling this method. To disable the InkCollector, set the Enabled property to false. After calling the SetAllTabletsMode method, enable the InkCollector by setting the Enabled property to true.

When an InkCollector object switches from collecting ink by using a single tablet to collecting ink by using all tablets, the Cursors property is set to the empty collection.

Note

If the SetAllTabletsMode method is called with the useMouseForInput parameter set to true (or no parameters), then the mouse is used as an input device. If the SetAllTabletsMode method is then called with the useMouseForInput parameter set to false, the mouse is not removed from the Cursors property.

Examples

This C# example calls SetAllTabletsMode on a new InkCollector object, theInkCollector, with the useMouseForInput parameter set to false if more than one tablet is available.

using Microsoft.Ink;
// . . .
Tablets theTablets = new Tablets();
InkCollector theInkCollector = new InkCollector();
if (theTablets.Count > 1)
theInkCollector.SetAllTabletsMode(false);
else
theInkCollector.SetAllTabletsMode();

This Microsoft Visual Basic .NET example calls SetAllTabletsMode on a new InkCollector object, theInkCollector, with the useMouseForInput parameter set to false if more than one tablet is available.

Imports Microsoft.Ink
' . . .
Dim theTablets As New Tablets()
Dim theInkCollector As New InkCollector()
If theTablets.Count > 1 Then
theInkCollector.SetAllTabletsMode(False)
Else
theInkCollector.SetAllTabletsMode()
End If

Platforms

Windows 7, Windows Vista, Windows Server 2008 R2, Windows Server 2008

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

See Also

Reference

InkCollector Class

InkCollector Members

SetAllTabletsMode Overload

Microsoft.Ink Namespace

SetAllTabletsMode

Tablets

InkCollector.Enabled

InkCollector.SetSingleTabletIntegratedMode