تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
[VB.NET] محتاج مساعده في برنامج لتشغيل الملفات الصوتية
#1
السلام عليكم انا بصمم برنامج لتشغيل الملفات الصوتية بس واقف قدامي حاجه واحده انا عامل قائمة تشغيل( play list (listbox وعايز كود يسمح لي بنقل الملفات الي listbox عن طريق مؤشر الموس بحيث يظهر لي في listbox مسار  الملف


الملفات المرفقة صورة/صور
   
الرد }}}
تم الشكر بواسطة:
#2
(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
الرد }}}
تم الشكر بواسطة: VB_Local
#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
شكرا علي الاجابة المفيده
الرد }}}
تم الشكر بواسطة:



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


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