Behavior.OnLoseCapture(Glyph, EventArgs) 方法

定义

装饰器窗口在失去鼠标捕获时调用。

public:
 virtual void OnLoseCapture(System::Windows::Forms::Design::Behavior::Glyph ^ g, EventArgs ^ e);
public virtual void OnLoseCapture(System.Windows.Forms.Design.Behavior.Glyph g, EventArgs e);
public virtual void OnLoseCapture(System.Windows.Forms.Design.Behavior.Glyph? g, EventArgs e);
abstract member OnLoseCapture : System.Windows.Forms.Design.Behavior.Glyph * EventArgs -> unit
override this.OnLoseCapture : System.Windows.Forms.Design.Behavior.Glyph * EventArgs -> unit
Public Overridable Sub OnLoseCapture (g As Glyph, e As EventArgs)

参数

g
Glyph

要对其调用拖放行为的 A Glyph

e
EventArgs

包含事件数据的一个 EventArgs

注解

一种行为可以通过行为服务请求鼠标捕获,方法是使用 PushCaptureBehavior 该方法将自身推送到行为堆栈。 如果这样做,则会在捕获丢失时通过 OnLoseCapture 方法通知它。 通常,此行为此时会从堆栈中删除自身。 发生以下操作之一时,捕获将丢失:

  • 其他人请求捕获。

  • 另一种行为是推送的。

  • 此行为已删除。

在上述每个情况下, OnLoseCapture 都会对行为进行调用。

适用于

另请参阅