bonjour a tous je n'arrive pas a afficher les mots d'un tableau dans une listbox.
tous ce que j'ai c'est indice de ce tableau.
si quelqu'un serais me guider? 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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87 '------------------------------------------------------------------------------------------------------------------------ PHRASE = PHRASE_ENTRER.Text PHRASE = PHRASE + " " '------------------------------------------------------------------------------------------------------------------------ STR_TABLEAU_DANS_L_ORDRE = Split(PHRASE) For INT_I = 0 To UBound(STR_TABLEAU_DANS_L_ORDRE) LST_TABLEAU_DANS_L_ORDRE.Items.Add(STR_TABLEAU_DANS_L_ORDRE(INT_I)) Next '-------------------------------------------------------------------------- Randomize() INT_TABLEAU_ALEATOIRE(1) = Int(Rnd() * INT_COMPTEUR_MOTS) + 1 For int_J = 2 To INT_COMPTEUR_MOTS Step +1 INT_TABLEAU_ALEATOIRE(int_J) = Int(Rnd() * INT_COMPTEUR_MOTS) + 1 For int_k = int_J - 1 To 1 Step -1 If INT_TABLEAU_ALEATOIRE(int_J) = INT_TABLEAU_ALEATOIRE(int_k) Then int_J = int_J - 1 Exit For End If Next int_k Next int_J For int_J = 1 To INT_COMPTEUR_MOTS ListBox1.Items.Add(INT_TABLEAU_ALEATOIRE(int_J)) Next int_J Dim int_aleatoire As Integer Dim str_mot_aleatoire As String For int_aleatoire = 1 To INT_TABLEAU_ALEATOIRE(int_J) str_mot_aleatoire = str_mot_aleatoire + INT_TABLEAU_ALEATOIRE(int_J) Next ListBox2.Items.Add(str_mot_aleatoire) End Sub Private Sub but_clear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles but_clear.Click ListBox1.Items.Clear() LST_TABLEAU_DANS_L_ORDRE.Items.Clear() End Sub End Class
Partager