تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
[VB.NET] محتاج مساعده في برنامج لتشغيل الملفات الصوتية
#3
(21-01-16, 05:43 PM)HASAN6.0 كتب :
(21-01-16, 04:21 PM)مدحت رمضان كتب : عايز كود يسمح لي بنقل الملفات الي listbox عن طريق مؤشر الموس بحيث يظهر لي في listbox مسار  الملف

هذا الكود
PHP كود :
Imports System.IO
Public Class Form1
    Private Sub ListBox1_DragDrop
(sender As ObjectAs DragEventArgsHandles ListBox1.DragDrop
        Dim files
() As String e.Data.GetData(DataFormats.FileDrop)
 
       ListBox1.Items.Clear()
 
       For Each file In files
            If Path
.GetExtension(file) = ".mp3" Then ListBox1.Items.Add(file)
 
       Next
    End Sub
    Private Sub ListBox1_DragEnter
(sender As ObjectAs DragEventArgsHandles ListBox1.DragEnter
        e
.Effect DragDropEffects.Copy
    End Sub

    Private Sub Form1_Load
(sender As ObjectAs EventArgsHandles MyBase.Load
        ListBox1
.AllowDrop True
    End Sub
End 
Class 
فقط قم بسحب الملفات والقائها على الـListBox   Wink
شكرا علي الاجابة المفيده
الرد }}}
تم الشكر بواسطة:


الردود في هذا الموضوع
RE: محتاج مساعده في برنامج لتشغيل الملفات الصوتية - بواسطة مدحت رمضان - 23-01-16, 09:49 AM


التنقل السريع :


يقوم بقرائة الموضوع: