bonjour,aprés avoir fais une fonction je me retrouve avec un avertissementsur le end fonction me specifiant que boucle ne retourne pas une valeur pour tous les chemins de code
merci
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
24 Private Function boucle(ByVal cas, ByVal boucle, ByVal jpeg, ByVal video) Dim Xwmp As IWMPMedia Dim cmd As OleDbCommand = cnn.CreateCommand For i = 1 To boucle cmd.CommandText = String.Format("SELECT (Chm) from {0} WHERE [ID] =" & i, jpeg) cnn.Close() cnn.Open() Dim Lecture As OleDbDataReader = cmd.ExecuteReader While Lecture.Read() DirectCast(Me.Controls("Label" & i), Label).Visible = True DirectCast(Me.Controls("Label" & i), Label).Text = System.IO.Path.GetFileNameWithoutExtension(Lecture(0)) DirectCast(Me.Controls("AxWindowsMediaPlayer" & i), AxWindowsMediaPlayer).Visible = True Xwmp = DirectCast(Me.Controls("AxWindowsMediaPlayer" & i), AxWindowsMediaPlayer).newMedia(Lecture(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() End While Next End Function
Partager