PRB: OLEDropMode=0 Doesn't Stop DragDrop of File to Rich TextBoxLast reviewed: September 3, 1997Article ID: Q173349 |
The information in this article applies to:
SYMPTOMSSetting 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.
CAUSEThe 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.
RESOLUTIONYou 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& STATUSThis behavior is by design.
MORE INFORMATIONThe steps provided below are for the Visual Basic 5.0 IDE.
Steps to Reproduce Behavior
Keywords : PrgCtrlsCus vb5all Technology : kbole Version : WINDOWS:5.0 Platform : WINDOWS Issue type : kbprb Solution Type : kbworkaround |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |