积极答复者
VB6 RichText文件拖放问题

问题
答案
全部回复
-
Code Snippet
RichTextBox1.AllowDrop = True
Private Sub RichTextBox1_DragEnter(ByVal sender As Object, _
ByVal e As System.Windows.Forms.DragEventArgs) _
Handles RichTextBox1.DragEnter
If (e.Data.GetDataPresent(DataFormats.FileDrop)) Then
e.Effect = DragDropEffects.Copy
Else
e.Effect = DragDropEffects.None
End If
End SubPrivate Sub RichTextBox1_DragDrop(ByVal sender As Object, _
ByVal e As System.Windows.Forms.DragEventArgs) _
Handles RichTextBox1.DragDrop
MsgBox(e.Data.GetData("FileNameW")(0))
End Sub -
feiyun0112 写: Code SnippetRichTextBox1.AllowDrop = True
Private Sub RichTextBox1_DragEnter(ByVal sender As Object, _
ByVal e As System.Windows.Forms.DragEventArgs) _
Handles RichTextBox1.DragEnter
If (e.Data.GetDataPresent(DataFormats.FileDrop)) Then
e.Effect = DragDropEffects.Copy
Else
e.Effect = DragDropEffects.None
End If
End SubPrivate Sub RichTextBox1_DragDrop(ByVal sender As Object, _
ByVal e As System.Windows.Forms.DragEventArgs) _
Handles RichTextBox1.DragDrop
MsgBox(e.Data.GetData("FileNameW")(0))
End Sub是VB6不是.NET.......