Export (0) Print
Expand All

HtmlElement.Drag Event

Note: This event is new in the .NET Framework version 2.0.

Occurs when the user drags text to various locations.

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in system.windows.forms.dll)

public event HtmlElementEventHandler Drag
/** @event */
public void add_Drag (HtmlElementEventHandler value)

/** @event */
public void remove_Drag (HtmlElementEventHandler value)

JScript supports the use of events, but not the declaration of new ones.

This event occurs when text is dragged to the following locations:

  • Within or between HTML pages hosted in the WebBrowser control or Internet Explorer

  • To another application

  • To the Windows desktop

You can cancel the default action for a Drag event on an element by setting the ReturnValue property of the HtmlElementEventArgs class to true.

A Drag event on an element will also occur on that element's parent elements and on the HtmlDocument class itself, unless you set the BubbleEvent property of the HtmlElementEventArgs class to true.

For more information about the difference between canceling event bubbling and canceling the default action on an event, see About the DHTML Object Model (http://msdn.microsoft.com/library/default.asp?url=/workshop/author/om/doc_object.asp).

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0

Community Additions

ADD
Show:
© 2015 Microsoft