RealTimeStylus.ClearStylusQueues 方法

清除 RealTimeStylus 对象的队列。

命名空间:  Microsoft.StylusInput
程序集:  Microsoft.Ink(在 Microsoft.Ink.dll 中)

语法

声明
Public Sub ClearStylusQueues
用法
Dim instance As RealTimeStylus

instance.ClearStylusQueues()
public void ClearStylusQueues()
public:
void ClearStylusQueues()
public void ClearStylusQueues()
public function ClearStylusQueues()

示例

此 Microsoft Visual C# .NET 示例是窗体的 Closed 事件处理程序中的代码段,它禁用 RealTimeStylusGestureRecognizerDynamicRenderer 对象,清空 RealTimeStylus 对象的队列,并调用对象的 Dispose 方法。

using Microsoft.Ink;
using Microsoft.StylusInput;
using Microsoft.StylusInput.PluginData;

// ...

// Declare the RealTimeStylus objects, the GestureRecognizer plugin,
// and the DynamicRenderer plug-in.
private Microsoft.StylusInput.RealTimeStylus thePrimaryRealTimeStylus = null;
private Microsoft.StylusInput.RealTimeStylus theSecondaryRealTimeStylus = null;
private Microsoft.StylusInput.GestureRecognizer theGestureRecognizer = null;
private Microsoft.StylusInput.DynamicRenderer theDynamicRenderer = null;

// ...

// The form's Closed event handler.
private void theForm_Closed(object sender, System.EventArgs e)
{
    // Disable appropriate plug-ins.
    this.theGestureRecognizer.Enabled = false;
    this.theDynamicRenderer.Enabled = false;
    this.theFilterPlugin.Enabled = false;

    // Empty the RealTimeStylus queues
    this.thePrimaryRealTimeStylus.ClearStylusQueues();
    this.theSecondaryRealTimeStylus.ClearStylusQueues();

    // Disable the RealTimeStylus.
    this.thePrimaryRealTimeStylus.Enabled = false;

    // Dispose of the the RealTimeStylus objects and appropriate plug-ins.
    this.thePrimaryRealTimeStylus.Dispose();
    this.thePrimaryRealTimeStylus = null;
    this.theSecondaryRealTimeStylus.Dispose();
    this.theSecondaryRealTimeStylus = null;
    this.theDynamicRenderer.Dispose();
    this.theDynamicRenderer = null;
    this.theGestureRecognizer.Dispose();
    this.theGestureRecognizer = null;
}

平台

Windows Vista, Windows XP SP2, Windows Server 2003

.NET Framework 和 .NET Compact Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求

版本信息

.NET Framework

受以下版本支持:3.0

另请参见

参考

RealTimeStylus 类

RealTimeStylus 成员

Microsoft.StylusInput 命名空间