24-02-20, 03:25 PM
إقتباس : اذا لم يكن مشروعك خاصا
ممكن تضع المشروع
مع ملفين يعملان وملف واحد لا يعمل للتجربه
الموضوع مش حكاية خاص وعام أستاذ لكن المشروع كبير لآنى بضع أغلب مشاريعى
بمشروع واحد , يعنى حضرتك ممكن يتم الحل من خلال تخمينك فقط..
فهذا الكود لجلب الاصوات داخل ليست بوكس 1 بالاسم وليست بوكس 2 بالمسار
كود :
ofb.InitialDirectory = ""
ofb.Multiselect = True
If (ofb.ShowDialog = Windows.Forms.DialogResult.OK) Then
filneames = ofb.SafeFileNames
paths = ofb.FileNames
For i As Integer = 0 To filneames.Length - 1
ListBox1.Items.Add(filneames(i))
Next
For i As Integer = 0 To filneames.Length - 1
ListBox2.Items.Add(paths(i))
Nextوهذا كود التشغيل وكود التحديد
كود :
Private Sub ListBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ListBox1.SelectedIndexChanged
ListBox2.SelectedIndex = ListBox1.SelectedIndex
End Sub
Private Sub ListBox2_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ListBox2.SelectedIndexChanged
AxWindowsMediaPlayer1.URL = ListBox2.SelectedItem
End Sub
