منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب
[VB.NET] محتاج مساعده في برنامج لتشغيل الملفات الصوتية - نسخة قابلة للطباعة

+- منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب (http://vb4arb.com/vb)
+-- قسم : قسم لغة الفيجوال بيسك VB.NET (http://vb4arb.com/vb/forumdisplay.php?fid=182)
+--- قسم : قسم اسئلة VB.NET (http://vb4arb.com/vb/forumdisplay.php?fid=183)
+--- الموضوع : [VB.NET] محتاج مساعده في برنامج لتشغيل الملفات الصوتية (/showthread.php?tid=14463)



محتاج مساعده في برنامج لتشغيل الملفات الصوتية - مدحت رمضان - 21-01-16

السلام عليكم انا بصمم برنامج لتشغيل الملفات الصوتية بس واقف قدامي حاجه واحده انا عامل قائمة تشغيل( play list (listbox وعايز كود يسمح لي بنقل الملفات الي listbox عن طريق مؤشر الموس بحيث يظهر لي في listbox مسار  الملف


RE: محتاج مساعده في برنامج لتشغيل الملفات الصوتية - HASAN6.0 - 21-01-16

(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

(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
شكرا علي الاجابة المفيده