bonjour,

sur mon formulaire ,pour le moment j'ai 3 media player miniature destiné a afficher des images differentes d'une table access.
le problème est que cela pourrait fonctionner si seulement je n'aurrait pas la même image qui s'affiche partout

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Private Sub Valider_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Valider.Click
        Dim Xwmp As IWMPMedia
        Dim cmd As OleDbCommand = cnn.CreateCommand
        Dim i As Integer
        Select Case True
 
            Case Jour.Checked And Eté.Checked And A.Checked
                For i = 1 To 3
                    cmd.CommandText = "SELECT clip FROM testa WHERE [n°] =" & i
                Next i
                Dim LectureUneInfojpg As OleDbDataReader = cmd.ExecuteReader
 
                While LectureUneInfojpg.Read()
                    For i = 1 To 3
 
                        Xwmp = DirectCast(Me.Controls("AxWindowsMediaPlayer" & i), AxWindowsMediaPlayer).newMedia(LectureUneInfojpg(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()
                    Next i
                End While
        End Select
    End Sub