FIX: OLEDropMode=0 Doesn't Stop DragDrop of File to Rich TextBox (173349)
The information in this article applies to:
- Microsoft Visual Basic Professional Edition for Windows 5.0
- Microsoft Visual Basic Enterprise Edition for Windows 5.0
This article was previously published under Q173349 SYMPTOMS
Setting the OLEDragMode property of a Rich TextBox control to
0-rtfOLEDropNone does not disable the ability to drag files from the
Windows Explorer and drop them into the Rich Textbox control.
CAUSE
The control should be allowed to accept dropped files independent of the
OLEDragMode property. This behavior is allowed because DragAcceptFiles
works independently of OLE drag and drop.
RESOLUTION
You can call the DragAcceptFiles API to set the Rich TextBox control so
that it does not accept files in a DragDrop operation.
The following is the declaration for the DragAcceptFiles API function:
Declare Sub DragAcceptFiles Lib "shell32.dll" (ByVal hwnd As Long, _
ByVal fAccept As Long)
You can then use the following line of code to set the Rich Textbox control
so that it cannot accept files in a DragDrop operation:
DragAcceptFiles ByVal RichTextBox1.hwnd, ByVal 0&
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article. This bug has been fixed in Visual Basic
6.0.
Modification Type: | Major | Last Reviewed: | 11/5/2003 |
---|
Keywords: | kbbug kbfix KB173349 |
---|
|