拖放操作和剪贴板支持Drag-and-Drop Operations and Clipboard Support

可以通过处理一系列事件(最主要是 DragEnterDragLeaveDragDrop 事件),在基于 Windows 的应用程序中启用用户拖放操作。You can enable user drag-and-drop operations within a Windows-based application by handling a series of events, most notably the DragEnter, DragLeave, and DragDrop events.

也可以使用简单的方法调用,在基于 Windows 的应用程序中对剪贴板实现用户剪切/复制/粘贴支持和用户数据传输。You can also implement user cut/copy/paste support and user data transfer to the Clipboard within your Windows-based applications by using simple method calls.

本节内容In This Section

演练:在 Windows 窗体中执行拖放操作Walkthrough: Performing a Drag-and-Drop Operation in Windows Forms
说明如何启动拖放操作。Explains how to start a drag-and-drop operation.

如何:执行应用程序之间的拖放操作How to: Perform Drag-and-Drop Operations Between Applications
演示如何跨应用程序完成拖放操作。Illustrates how to accomplish drag-and-drop operations across applications.

如何:将数据添加到剪贴板How to: Add Data to the Clipboard
介绍如何以编程方式在剪贴板上插入信息。Describes a way to programmatically insert information on the Clipboard.

如何:从剪贴板中检索数据How to: Retrieve Data from the Clipboard
介绍如何访问剪贴板上存储的数据。Describes how to access the data stored on the Clipboard.

Windows 窗体中的拖放功能Drag-and-Drop Functionality in Windows Forms
介绍用于实现拖放行为的方法、事件和类。Describes the methods, events, and classes used to implement drag-and-drop behavior.

QueryContinueDrag
介绍要求权限才能继续拖动操作的事件的复杂性。Describes the intricacies of the event that asks permission to continue the drag operation.

DoDragDrop
介绍对开始拖动操作极为重要的方法的复杂性。Describes the intricacies of the method that is central to beginning a drag operation.

Clipboard
另请参阅如何:将数据发送到活动的 MDI 子窗体Also see How to: Send Data to the Active MDI Child.