Article ID: 814309 - View products that this article applies to.
Beta InformationThis article discusses a Beta release of a Microsoft product. The information in this article is provided as-is and is subject to change without notice.
No formal product support is available from Microsoft for this Beta product. For information about how to obtain support for a Beta release, see the documentation that is included with the Beta product files, or check the Web location from which you downloaded the release.
You try to drag a RichTextBox control with the code in the "Enabling Drag-and-Drop Operations with the Windows Forms RichTextBox Control" MSDN document. The change may occur in the pointer when you drag the text from WordPad. However, you cannot drop the text from the RichTextBox.
This problem occurs because there is no code for the Drop event in MSDN documentation. Therefore, you cannot drop the text that you select from WordPad in the RichTextBox.
To work around this problem, add a DragDrop event for RichTextBox1. To do this, use the following instructions.
Visual Basic .NET or Visual Basic 2005
Add the following code in the RichTextBox1 DragDrop event:
Visual C# .NET or Visual C# 2005
Add the following code to the Form1 class constructor after the InitializeComponent() statement:
Add the following procedure to the code after the Main() method:
Steps to Reproduce the Behavior
For more information, visit the following MSDN Web site:
Enabling Drag-and-Drop Operations with the Windows Forms RichTextBox Control
For more information about the RichTextBox.DragEnter event and the RichTextBox.DragDrop event, see your .NET Framework SDK documentation or visit the following MSDN Web site:
Article ID: 814309 - Last Review: November 13, 2007 - Revision: 2.9