14-08-13, 03:06 PM (آخر تعديل لهذه المشاركة : 14-08-13, 03:08 PM {2} بواسطة kslawy.)
كود :
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
TextBox1.AllowDrop = True
End Sub
Private Sub textBox1_DragEnter(ByVal sender As Object, ByVal e As DragEventArgs) Handles TextBox1.DragEnter
If e.Data.GetDataPresent(DataFormats.FileDrop) Then
e.Effect = DragDropEffects.Copy
End If
End Sub
Private Sub textBox1_DragDrop(ByVal sender As Object, ByVal e As DragEventArgs) Handles TextBox1.DragDrop
If e.Data.GetDataPresent(DataFormats.FileDrop) Then
Dim fileNames As String() = DirectCast(e.Data.GetData(DataFormats.FileDrop), String())
TextBox1.Lines = fileNames
End If
End Sub
للمزيد يمكنك العثور علي دروس فيديو في اليوتوب ....