Sub affichage(Index As Integer) Dim Exist_image As String Exist_image = Dir(App.Path & "\" & tab_capsule(Index).Numero_Capsule & ".jpg") 'traite les photos If Exist_image = "" Then photo_capsule.Picture = LoadPicture(App.Path & "\aucun.jpg") Else photo_capsule.Picture = LoadPicture(Exist_image) End If 'traite les donnees Nom.Text = Strings.Trim(tab_capsule(Index).Nom) Prenom.Text = Strings.Trim(tab_capsule(Index).Prenom) couleur.Text = Strings.Trim(tab_capsule(Index).couleur) Dessin.Text = Strings.Trim(tab_capsule(Index).Dessin) Numero_Capsule.Text = Strings.Trim(tab_capsule(Index).Numero_Capsule) village.Text = Strings.Trim(tab_capsule(Index).village) Cotation.Text = Strings.Trim(tab_capsule(Index).Cotation) totalcot.Text = Strings.Trim(tab_capsule(Index).totalcot) totalcaps.Text = Strings.Trim(tab_capsule(Index).totalcaps) lambert1.Text = Strings.Trim(tab_capsule(Index).lambert1) Liste_capsule.Text = (Numero_Capsule) & " | " & (Nom.Text) & " " & (Prenom.Text) & " " & (couleur.Text) & " " & (Dessin.Text) & " " & (village.Text) & " | " & (Cotation.Text) List2.Clear capsule_en_cours = Index If capsule_en_cours = 1 Then Btn_premier.Enabled = False Btn_precedent.Enabled = False Else Btn_premier.Enabled = True Btn_precedent.Enabled = True End If If capsule_en_cours = dernier_capsule Then Btn_suivant.Enabled = False Btn_dernier.Enabled = False Else Btn_suivant.Enabled = True Btn_dernier.Enabled = True End If 'traite affichage liste_capsule & liste_capsule2 Liste_capsule2.Text = (Numero_Capsule.Text) & " | " & (Nom.Text) & " " & (Prenom.Text) Liste_capsule.Text = (Numero_Capsule) & " | " & (Nom.Text) & " " & (Prenom.Text) & " " & (couleur.Text) & " " & (Dessin.Text) & " " & (village.Text) 'traite affichage list2 Dim y As Integer Dim a As Double Dim x As Integer For x = 1 To dernier_capsule Liste_capsule2.AddItem (tab_capsule(x).Numero_Capsule) List2.AddItem (tab_capsule(x).Numero_Capsule) & " = " & " " & (tab_capsule(x).Cotation) 'traite affichage la valeur totale List3.Clear Next For x = 1 To dernier_capsule List3.AddItem Strings.Trim(tab_capsule(x).Cotation) Next a = 0 For y = 0 To List3.ListCount - 1 If IsNumeric(List3.List(y)) Then a = a + List3.List(y) totalcot.Text = a End If totalcaps = dernier_capsule ProgressBar1.Value = totalcaps ProgressBar2.Value = totalcot Next End Sub
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionSub affichage(Index As Integer) Dim Exist_image As String Exist_image = Dir(App.Path & "\" & tab_capsule(Index).Numero_Capsule & ".jpg") 'traite les photos If Exist_image = "" Then photo_capsule.Picture = LoadPicture(App.Path & "\aucun.jpg") Else photo_capsule.Picture = LoadPicture(Exist_image) End If 'traite les donnees Nom.Text = Strings.Trim(tab_capsule(Index).Nom) Prenom.Text = Strings.Trim(tab_capsule(Index).Prenom) couleur.Text = Strings.Trim(tab_capsule(Index).couleur) Dessin.Text = Strings.Trim(tab_capsule(Index).Dessin) Numero_Capsule.Text = Strings.Trim(tab_capsule(Index).Numero_Capsule) village.Text = Strings.Trim(tab_capsule(Index).village) Cotation.Text = Strings.Trim(tab_capsule(Index).Cotation) totalcot.Text = Strings.Trim(tab_capsule(Index).totalcot) totalcaps.Text = Strings.Trim(tab_capsule(Index).totalcaps) lambert1.Text = Strings.Trim(tab_capsule(Index).lambert1) Liste_capsule.Text = (Numero_Capsule) & " | " & (Nom.Text) & " " & (Prenom.Text) & " " & (couleur.Text) & " " & (Dessin.Text) & " " & (village.Text) & " | " & (Cotation.Text) List2.Clear capsule_en_cours = Index If capsule_en_cours = 1 Then Btn_premier.Enabled = False Btn_precedent.Enabled = False Else Btn_premier.Enabled = True Btn_precedent.Enabled = True End If If capsule_en_cours = dernier_capsule Then Btn_suivant.Enabled = False Btn_dernier.Enabled = False Else Btn_suivant.Enabled = True Btn_dernier.Enabled = True End If ' traite affichage liste_capsule & liste_capsule2 Liste_capsule2.Text = (Numero_Capsule.Text) & " | " & (Nom.Text) & " " & (Prenom.Text) Liste_capsule.Text = (Numero_Capsule) & " | " & (Nom.Text) & " " & (Prenom.Text) & " " & (couleur.Text) & " " & (Dessin.Text) & " " & (village.Text) 'traite affichage list2 Dim y As Integer Dim a As Double Dim x As Integer For x = 1 To dernier_capsule Liste_capsule2.AddItem (tab_capsule(x).Numero_Capsule) List2.AddItem (tab_capsule(x).Numero_Capsule) & " = " & " " & (tab_capsule(x).Cotation) Next 'traite affichage la valeur totale List3.Clear For x = 1 To dernier_capsule List3.AddItem Strings.Trim(tab_capsule(x).Cotation) Next a = 0 For y = 0 To List3.ListCount - 1 If IsNumeric(List3.List(y)) Then a = a + List3.List(y) totalcot.Text = a End If totalcaps = dernier_capsule ProgressBar1.Value = totalcaps ProgressBar2.Value = totalcot Next End Sub