07-05-15, 11:30 AM
مالخطأ في هذه الأكواد
كود القائمة
كود اضافة
كود حذف ملف
عند تجربة الأكواد لم يظهر اي خطأ لكن لم تعمل هذه الاضافات
كود القائمة
PHP كود :
Private Sub ListBox1_DragDrop(sender As Object, e As DragEventArgs) Handles ListBox1.DragDrop
If e.Data.GetDataPresent(DataFormats.FileDrop) Then
Dim filePaths As String() =
CType(e.Data.GetData(DataFormats.FileDrop), String())
For Each s As String In filePaths
Dim FI As New IO.FileInfo(s)
Dim exten As String =
FI.Name.Substring(FI.Name.LastIndexOf(".") + 1, FI.Name.Length -
(FI.Name.LastIndexOf(".") + 1))
If exten = "mp3" Or exten = "wmv" Then
ListBox1.Items.Add(s)
End If
Next
End If
End Sub
Private Sub ListBox1_DragEnter(sender As Object, e As DragEventArgs) Handles ListBox1.DragEnter
If e.Data.GetDataPresent(DataFormats.FileDrop) Then
e.Effect = DragDropEffects.Copy
Else
e.Effect = DragDropEffects.None
End If
End Sub
كود اضافة
PHP كود :
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim dlg As New OpenFileDialog
dlg.Filter = "All Files|*.(*.wav;*.mp3;*.mp4;*.mpeg;*.dat;*.wma;*.wm v;*.rm;*.ram;*.avi;*.asf;*."
If dlg.ShowDialog() = Windows.Forms.DialogResult.OK Then
End If
End Sub
كود حذف ملف
PHP كود :
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
the.delled()
End Sub
End Class
عند تجربة الأكواد لم يظهر اي خطأ لكن لم تعمل هذه الاضافات
