Bonjour,
je créer un générateur de clé dans listbox1 mais a partir de 4 chiffre. il ralenti. je voudrais savoir comment optimiser accèleration du générateur de clé?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8 dim MyThread As New Thread(Sub() While True For t = 12 To 12 AllKey("", t) Next t End While End Sub) MyThread.Start()il commence :
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 Private Sub AllKey(ByVal Pass As String, ByVal Lg As Integer) If CheckBox1.Checked = True Then dico = "0123456789ABCDEF" ElseIf CheckBox2.Checked = True Then dico = "0123456789abcdef" End If If Pass.Length < Lg Then For i = 0 To dico.Length - 1 AllKey(Pass & dico.Substring(i, 1), Lg) Next i Else ListBox1.Invoke(Sub() ListBox1.Items.Add(Pass)) ListBox1.Invoke(Sub() ListBox1.SelectedIndex = ListBox1.Items.Count - 1) End If End Sub
000000000000
000000000001
000000000002 .....etc
pouvez-vous me dire comment optimiser accèléeration du générateur de clé a 12 chiffres?
Merci d'avance
Partager