Visualizzazione dei risultati da 1 a 10 su 11

Visualizzazione discussione

  1. #9
    si si conosco le classi che mi servono
    comunque una volta programmavo con vb ma sono anni che non lo tocco e mi sono dimenticato tutto.
    Ho appena sfornato il codice:
    codice:
     Const chars = "abcdefghilmnopqrstuvzywxj"
        Private Sub generates_Click(sender As Object, e As EventArgs) Handles generates.Click
            If Check3.Checked = False And Check2.Checked = False And Check1.Checked = False Then
                MsgBox("Devi scegliere un opzione", vbCritical, "Errore")
            End If
    
            If Check3.Checked = True Then
                Text1.Text = Mid$("abcdfghjklmnpqrstvwxz", Int(Rnd() * 20) + 1, 10)
            End If
    
            If Check2.Checked = True Then
                Text1.Text = Mid$("ABCDFGHJKLMNPQRSTVWXZ", Int(Rnd() * 20) + 1, 10)
            End If
    
            If Check1.Checked = True Then
                Text1.Text = Mid$("0123456789987654321", Int(Rnd() * 19) + 1, 10)
            End If
    
    
    
    
            If Check3.Checked And Check2.Checked Then
                Text1.Text = Mid$("ABCDFGHJKLMNPQRSTVWXZabcdfghj#klmnpqrstvwxz", Int(Rnd() * 40) + 1, 10)
            End If
    
    
    
    
            If Check3.Checked And Check1.Checked Then
                Text1.Text = Mid$("abcdfghjklmnpqrstvwxz01234567#89987654321", Int(Rnd() * 39) + 1, 10)
            End If
    
    
    
    
            If Check2.Checked And Check1.Checked Then
                Text1.Text = Mid$("ABCDFGHJKLMNPQRSTVWXZ01234567#89987654321", Int(Rnd() * 39) + 1, 10)
            End If
    
    
    
    
            If Check1.Checked And Check2.Checked And Check3.Checked Then
                Text1.Text = Mid$("0123456789ABCDFGHJKLMNPQRSTVW#XZabcdfghjklmnpqrstvwxz", Int(Rnd() * 59) + 1, 10)
            End If
        End Sub
    Però non mi funziona una cosa e non so come mai... Quando clicco il button e le rispettive checkbox mi mette le cose a caso e non secondo le checkbox cliccate come mai?
    Ultima modifica di MItaly; 25-05-2014 a 15:12 Motivo: ho fatto il codice

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.