Control.OnQueryContinueDrag(QueryContinueDragEventArgs) Method


引发 QueryContinueDrag 事件。Raises the QueryContinueDrag event.

 virtual void OnQueryContinueDrag(System::Windows::Forms::QueryContinueDragEventArgs ^ qcdevent);
protected virtual void OnQueryContinueDrag (System.Windows.Forms.QueryContinueDragEventArgs qcdevent);
abstract member OnQueryContinueDrag : System.Windows.Forms.QueryContinueDragEventArgs -> unit
override this.OnQueryContinueDrag : System.Windows.Forms.QueryContinueDragEventArgs -> unit
Protected Overridable Sub OnQueryContinueDrag (qcdevent As QueryContinueDragEventArgs)



一个包含事件数据的 QueryContinueDragEventArgsA QueryContinueDragEventArgs that contains the event data.


开始拖动后,.NET Framework.NET Framework 将重复调用此方法,直到取消或完成拖动操作。After dragging has begun, this method is called repeatedly by the .NET Framework.NET Framework until the drag operation is either canceled or completed.


如果要更改取消拖动或发生放置的点,请重写此方法。Override this method if you want to change the point at which dragging is canceled or at which a drop occurs.

引发事件时,将通过委托调用事件处理程序。Raising an event invokes the event handler through a delegate. 有关详细信息,请参阅处理和引发事件For more information, see Handling and Raising Events.

利用 OnQueryContinueDrag 方法,派生类还可以处理事件,而无需附加委托。The OnQueryContinueDrag method also enables derived classes to handle the event without attaching a delegate. 这是在派生类中处理事件的首选技术。This is the preferred technique for handling the event in a derived class.

Notes to Inheritors

在派生类中重写 OnQueryContinueDrag(QueryContinueDragEventArgs) 时,一定要调用基类的 OnQueryContinueDrag(QueryContinueDragEventArgs) 方法,以便已注册的委托对事件进行接收。When overriding OnQueryContinueDrag(QueryContinueDragEventArgs) in a derived class, be sure to call the base class's OnQueryContinueDrag(QueryContinueDragEventArgs) method so that registered delegates receive the event.

Applies to

See also