Article ID: 173349
Article Last Modified on 11/5/2003
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&
Declare Sub DragAcceptFiles Lib "shell32.dll" (ByVal hwnd As _
Long, ByVal fAccept As Long)
Private Sub Command1_Click()
Me.Caption = "DragDrop Enabled"
RichTextBox1.OLEDragMode = rtfOLEDragAutomatic
RichTextBox1.OLEDropMode = rtfOLEDropAutomatic
End Sub
Private Sub Command2_Click()
Me.Caption = "DragDrop Disabled"
RichTextBox1.OLEDropMode = rtfOLEDropNone
RichTextBox1.OLEDragMode = rtfOLEDragManual
'Uncomment the following line to disable DragDrop of files
'DragAcceptFiles ByVal RichTextBox1.hwnd, ByVal 0&
End Sub
Private Sub Form_Load()
Me.Caption = "DragDrop Enabled"
Command1.Caption = "Enable DragDrop"
Command2.Caption = "Disable DragDrop"
RichTextBox1.OLEDragMode = rtfOLEDragAutomatic
RichTextBox1.OLEDropMode = rtfOLEDropAutomatic
End Sub
Additional query words: kbIDE kbVBp500bug kbVBp600fix kbVBp kbdsd kbDSupport kbControl
Keywords: kbbug kbfix KB173349