Thread obsoleto Come creare un generatore di codici su VB?

Amazzonia

Utente Assiduo
Autore del topic
10 Luglio 2012
505
21
Miglior risposta
0
Come si crea un generatore di codici su VB 2010 ???

Es. codice: Q78HD-6JDH2-JFDND-SJF6S-7NGF4

Ho un progres bar , label1 label2 textbox button1

Praticamente sta il tasto (button1) che lo chiamo GENERA , Mentre (textbox) deve apparire qui il codice su textbox COME FACCIO????
 
Come si crea un generatore di codici su VB 2010 ???

Es. codice: Q78HD-6JDH2-JFDND-SJF6S-7NGF4

Ho un progres bar , label1 label2 textbox button1

Praticamente sta il tasto (button1) che lo chiamo GENERA , Mentre (textbox) deve apparire qui il codice su textbox COME FACCIO????

A che ti serve la progress bar? :emoji_relieved:

Comunque vai nel button ( supponendo che la textbox si chiami textbox1 ) e inserisci questo codice:

Codice:
Perfavore, Entra oppure Registrati per vedere i codici!

Ovviamente devi inserire tanti Case quanti sono i seriali ( Case 1 , Case 2 , Case 3 ... ) ;)

P.s. sposto in assistenza tecnica!
 
@Ignazio96 Case <- Ovvero???

E un'altra domanda: Quando volglio mettere tantissimi codici faccio così??? [CLICCO BUTTON] e... :
------------------------------------------------------------------------------------------------
TextBox1.Text = Int(Rnd() * 2)
Select Case TextBox1.Text
Case 0
TextBox1.Text = "SERIALE"
Case 1
TextBox1.Text = "SERIALE"
Case 2
TextBox1.Text = "SERIALE"

End Select
-----------------------------------------------------
e via dicendo giusto??
 
@Ignazio96 Case <- Ovvero???

E un'altra domanda: Quando volglio mettere tantissimi codici faccio così??? [CLICCO BUTTON] e... :
------------------------------------------------------------------------------------------------
TextBox1.Text = Int(Rnd() * 2)
Select Case TextBox1.Text
Case 0
TextBox1.Text = "SERIALE"
Case 1
TextBox1.Text = "SERIALE"
Case 2
TextBox1.Text = "SERIALE"

End Select
-----------------------------------------------------
e via dicendo giusto??

Esattamente,per ogni codice che vuoi inserire devi inserire un

Case NUMEROCASE
TextBox1.Text = "SERIALE"