Hızlı Konu Açma

Hızlı Konu Açmak için tıklayınız.

Son Mesajlar

Konulardaki Son Mesajlar

Reklam

Forumda Reklam Vermek İçin Bize Ulaşın

VB.NET Sürükle Bırak (Drag-Drop)

BOMBFACTORY

Uzman Üye
Uzman Üye
Trabzonspor
Katılım
5 Ocak 2014
Mesajlar
3,333
Tepkime puanı
6
Puanları
136











Kodları:
Imports System.IO
-------------------------------------------------------

Private Sub TextBox1_DragDrop(sender As Object, e As System.Windows.Forms.DragEventArgs) Handles TextBox1.DragDrop
Dim filePaths As String() = CType(e.Data.GetData(DataFormats.FileDrop), String())
For Each fileLoc As String In filePaths
If File.Exists(fileLoc) Then
TextBox1.Text = fileLoc
End If
Next fileLoc
End Sub
Private Sub TextBox1_DragEnter(sender As Object, e As System.Windows.Forms.DragEventArgs) Handles TextBox1.DragEnter
If e.Data.GetDataPresent(DataFormats.FileDrop) Then
e.Effect = DragDropEffects.Copy
Else
e.Effect = DragDropEffects.None
End If
End Sub​
 

Users Who Are Viewing This Konu (Users: 0, Guests: 1)

Üst