1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
| cmd.CommandText = "SELECT eti, Chm, Chms from {1} INNER JOIN {0} ON {1}.ID={0}.ID WHERE [{1}.ID] IN ("
For i = 1 To boucle
cmd.CommandText &= i.ToString & ", "
Next
cmd.CommandText.Remove(0, cmd.CommandText.Length - 2)
cmd.CommandText &= ")"
cmd.CommandText = String.Format(cmd.CommandText, jpg, basdef)
cnn.Close()
cnn.Open()
Dim Lecturejpg As OleDbDataReader = cmd.ExecuteReader
For i = 1 To boucle
While Lecturejpg.Read()
DirectCast(Me.Controls("AxWindowsMediaPlayer" & i), AxWindowsMediaPlayer).Visible = True
Xwmp = DirectCast(Me.Controls("AxWindowsMediaPlayer" & i), AxWindowsMediaPlayer).newMedia(Lecturejpg(0))
DirectCast(Me.Controls("AxWindowsMediaPlayer" & i), AxWindowsMediaPlayer).currentPlaylist.insertItem(0, Xwmp)
DirectCast(Me.Controls("AxWindowsMediaPlayer" & i), AxWindowsMediaPlayer).Ctlcontrols.play()
DirectCast(Me.Controls("AxWindowsMediaPlayer" & i), AxWindowsMediaPlayer).Ctlcontrols.pause()
lecture = Lecturejpg.GetString(0).Replace("_", " ")
DirectCast(Me.Controls("Label" & i), Label).Visible = True
DirectCast(Me.Controls("Label" & i), Label).Text = System.IO.Path.GetFileNameWithoutExtension(lecture)
End While
Next |