WorkflowView.OnQueryContinueDrag(QueryContinueDragEventArgs) Método
Definição
Ocorre durante uma operação de arrastar e permite que a origem de arrastar determine se a opção de arrastar deve ser cancelada.Occurs during a drag operation and allows the drag source to determine whether the drag option should be canceled.
protected:
override void OnQueryContinueDrag(System::Windows::Forms::QueryContinueDragEventArgs ^ qcdevent);
protected override void OnQueryContinueDrag (System.Windows.Forms.QueryContinueDragEventArgs qcdevent);
override this.OnQueryContinueDrag : System.Windows.Forms.QueryContinueDragEventArgs -> unit
Protected Overrides Sub OnQueryContinueDrag (qcdevent As QueryContinueDragEventArgs)
Parâmetros
- qcdevent
- QueryContinueDragEventArgs
Um QueryContinueDragEventArgs que contém informações sobre o evento.A QueryContinueDragEventArgs that contains information about the event.
Comentários
O OnQueryContinueDrag evento é gerado quando há uma alteração no estado do botão do mouse ou do teclado durante uma operação de arrastar.The OnQueryContinueDrag event is raised when there is a change in the keyboard or mouse button state during a drag operation. O OnQueryContinueDrag evento permite que a origem de arrastar determine se a operação de arrastar deve ser cancelada.The OnQueryContinueDrag event allows the drag source to determine whether the drag operation should be canceled.
Eventos relacionados a operações de arrastar são gerados quando o controle é um destino de soltura válido.Events related to drag operations are raised when the control is a valid drop target. O OnGiveFeedback evento é gerado com o efeito de arrastar especificado.The OnGiveFeedback event is raised with the drag effect specified. Para obter uma lista de efeitos de arrastar, consulte a DragDropEffects enumeração.For a list of drag effects, see the DragDropEffects enumeration.
As alterações na posição do cursor do mouse, no estado do teclado e no estado do botão do mouse são controladas.Changes in the mouse cursor position, keyboard state, and mouse button state are tracked.
Se o usuário sai de uma janela, o OnDragLeave evento é gerado.If the user moves out of a window, the OnDragLeave event is raised.
Se o mouse entrar em outro controle, o OnDragEnter para esse controle será gerado.If the mouse enters another control, the OnDragEnter for that control is raised.
Se o mouse se mover, mas permanecer dentro do mesmo controle, o OnDragOver evento será gerado.If the mouse moves but stays within the same control, the OnDragOver event is raised.
Se houver uma alteração no estado do botão do mouse ou do teclado, o OnQueryContinueDrag evento será gerado e determinará se deseja continuar a arrastar, para descartar os dados ou para cancelar a operação com base no valor da Action Propriedade do evento QueryContinueDragEventArgs .If there is a change in the keyboard or mouse button state, the OnQueryContinueDrag event is raised and determines whether to continue the drag, to drop the data, or to cancel the operation based on the value of the Action property of the event QueryContinueDragEventArgs.
Se o valor for DragAction.Continue , o OnDragOver evento será gerado para continuar a operação e o OnGiveFeedback evento será gerado com o novo efeito, de modo que os comentários visuais apropriados possam ser definidos.If the value is DragAction.Continue, the OnDragOver event is raised to continue the operation and the OnGiveFeedback event is raised with the new effect so appropriate visual feedback can be set. Para obter uma lista de efeitos de remoção válidos, consulte a DragDropEffects enumeração.For a list of valid drop effects, see the DragDropEffects enumeration.
Observação
Os OnDragOver OnGiveFeedback eventos e são emparelhados para que, à medida que o mouse se move entre o destino de soltura, o usuário recebe os comentários mais atualizados sobre a posição do mouse.The OnDragOver and OnGiveFeedback events are paired so that as the mouse moves across the drop target, the user is given the most up-to-date feedback on the mouse position.
Se o valor for DragAction.Drop , o valor do efeito de soltar será retornado para a origem, de modo que o aplicativo de origem poderá executar a operação apropriada nos dados de origem; por exemplo, recortar os dados se a operação foi movida.If the value is DragAction.Drop, the drop effect value is returned to the source, so the source application can perform the appropriate operation on the source data; for example, cut the data if the operation was a move.
Se o valor for DragAction.Cancel , o OnDragLeave evento será gerado.If the value is DragAction.Cancel, the OnDragLeave event is raised.
Por padrão, o OnQueryContinueDrag evento será definido Action como DragAction.Cancel se a tecla ESC fosse pressionada e definida Action como DragAction.Drop se o botão esquerdo, central ou direito do mouse for pressionado.By default, the OnQueryContinueDrag event sets Action to DragAction.Cancel if the ESC key was pressed and sets Action to DragAction.Drop if the left, middle, or right mouse button is pressed.