Tengo el siguiente Keygen que genera varias claves..
Ire por fila y nombramientos
Text Box 1: Donde la persona pondra su Nombre.
Text box 2: Donde saldra el Key
Check Box 1: Donde marcara si es la version vieja [Key 16 digitos]
Check box 2: Donde marcara si es la version moderna [Key 20 digitos]
Botton 1: El boton de generar
Este es mi codigo:
Código
Public Class Form1 Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) End Sub Private Sub CheckedListBox44_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) End Sub Private Sub iCT_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) End Sub Private Sub INGENUITY_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) End Sub Private Sub CheckBox6_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox6.CheckedChanged End Sub Private Sub CheckBox5_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox5.CheckedChanged End Sub Private Sub CheckBox4_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox4.CheckedChanged End Sub Private Sub CheckBox9_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox9.CheckedChanged End Sub Private Sub CheckBox8_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox8.CheckedChanged End Sub Private Sub CheckBox7_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox7.CheckedChanged End Sub Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox2.TextChanged End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click TextBox2.Text = Int(Rnd() * 5) Select Case TextBox2.Text Case 0 TextBox2.Text = "71587E67012990840EC0913F7EB17FDCEC2A43BF3523014C0432BF44075435FC" Case 1 TextBox2.Text = "CC227E5F012990BE4E476CC2834C8223C1C7BE42C8DEFCFA21DC52A9FB69C7BD" Case 2 TextBox2.Text = "43C67E5D012990BEAAC807A9E827E94A7ABCD529A3B597DA92A429D291C2A36A" Case 3 TextBox2.Text = "5DA27BED012990BEC6D6759B9A5D9EC808CEA75BD1C7E5A8E0DE5BA0E3B0D118" Case 4 TextBox2.Text = "7AF7BF290122547A93FA07E9E82FECBA7ABCD529A3B597DA92AC29D291C2A36A" End Select End Sub Private Sub CheckBox1_CheckedChanged_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged Handles CheckBox1.CheckedChanged If CheckBox1.Checked Then TextBox1.Enabled = True Else TextBox1.Enabled = False End If End Sub Private Sub CheckBox2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox2.CheckedChanged Handles CheckBox2.CheckedChanged If CheckBox2.Checked Then TextBox1.Enabled = True Else TextBox1.Enabled = False End If End Sub End Class
Mis problemas...
1- No se como hacer que sea obligatorio escribir algo en mi Text box 1 para asi te permita presionar el Botton 1.
2- Cuando trato de compilar este codigo:
Código:
Private Sub CheckBox2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox2.CheckedChanged
Handles CheckBox2.CheckedChanged
If CheckBox2.Checked Then
TextBox1.Enabled = True
Else
TextBox1.Enabled = False
End If
End Sub
Es para que el Text box este oculto y sea obligatorio seleccionar uno de los CheckBox para habilitarlo. Al ejectuarlo me da error de Sintax en el area de: "Handles"; Me lo podrian explicar?
3- Se como hacer que salga un Key en un rand.. pero no se como hacer para que cuando yo seleccione el CheckBox 1 solo se active el rand de las Key de 16 y si selecciono el CheckBox 2 solo se active el rand de las key de 20.
Saludos!