This documentation is archived and is not being maintained.

Drag-and-Drop Operations and Clipboard Support

Visual Studio .NET 2003

Users are familiar with the action of dragging objects and items from one area of the screen to the other; it is an essential user action that is constantly reinforced within most graphical user interfaces. Enabling drag support within a Windows application is done through the handling of a series of events, most notably the DragEnter, DragLeave, and DragDrop events. By working with the information available in the event arguments of these events, you can easily facilitate dragging and dropping.

Another form of data transfer involves using a data store extraneous to the application: the Clipboard. Users will be familiar with cut/copy/paste activities within word processors; you can implement this within your Windows applications using simple method calls.

In This Section

Performing Drag-and-Drop Operations in Windows Forms
Explains how to commence a drag-and-drop operation.
Placing Data on the Clipboard
Describes a method for programmatically inserting information on the Clipboard.
Retrieving Information from the Clipboard
Describes how to access the data stored on the Clipboard.
Performing Drag-and-Drop Operations Between Applications
Illustrates how to accomplish drag-and-drop operations across applications.

Related Sections

Control.QueryContinueDrag Event
Describes the intricacies of the event that asks permission to continue the drag operation.
Control.DoDragDrop Method
Describes the intricacies of the method that is central to beginning a drag operation.
Sending Data to the Active MDI Child
Discusses moving data from the Clipboard to the MDI child window that has focus.
Introduction to Windows Forms
Explains the basics of Windows Forms.
Windows Forms
Provides an overview of Windows Forms.