Sprawdź:
						 
					
				
			
		 witajcie
natrafilem dzisiaj na problem przy tworzeniu keygena skladajacego sie z 4 radiobuttonow, otoż tylko przy jednym radiobuttonie klucz się wyświetla, a przy pozostałych 3 nie działa
vb nie pokazuje żadnego błędu
przy kliknięciu tylko w radiobutton4 pokazuje się komunikat i wyświetla klucz, a przy reszcie jest poprostu lipa, dodam że pasek ładowania, przycisk reset i komunikat końcowy działają bez zarzutu, wszystko śmiga tak jak powinno
problem jest tylko w tym, że wybierając radiobutton 1,2 lub 3 pasek ładuje się do końca, wyskakuje komunikat a klucz nie pojawia się
oto kod zródłowy: (może ktoś z Was doszuka się w nim błędu bo ja go nie widze)
---------------
button (start, generate, hack czy jak kto tam woli)
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If RadioButton1.Checked = False And
            RadioButton3.Checked = False And
            RadioButton2.Checked = False And
            RadioButton4.Checked = False Then
            MessageBox.Show("xxxxxx", "Error")
        Else
            Timer1.Start()
            ProgressBar1.Value = ProgressBar1.Minimum
            If RadioButton1.Checked Then
                RadioButton2.Enabled = False
                RadioButton3.Enabled = False
                RadioButton4.Enabled = False
            End If
            If RadioButton2.Checked Then
                RadioButton1.Enabled = False
                RadioButton3.Enabled = False
                RadioButton4.Enabled = False
            End If
            If RadioButton3.Checked Then
                RadioButton1.Enabled = False
                RadioButton2.Enabled = False
                RadioButton4.Enabled = False
            End If
            If RadioButton4.Checked Then
                RadioButton1.Enabled = False
                RadioButton2.Enabled = False
                RadioButton3.Enabled = False
            End If
        End If
    End Sub
--------------
button reset
 Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        ProgressBar1.Value = ProgressBar1.Minimum
        If RadioButton1.Checked Then
            RadioButton2.Enabled = True
            RadioButton3.Enabled = True
            RadioButton4.Enabled = True
        End If
        If RadioButton2.Checked Then
            RadioButton1.Enabled = True
            RadioButton3.Enabled = True
            RadioButton4.Enabled = True
        End If
        If RadioButton3.Checked Then
            RadioButton1.Enabled = True
            RadioButton2.Enabled = True
            RadioButton4.Enabled = True
        End If
        If RadioButton4.Checked Then
            RadioButton1.Enabled = True
            RadioButton2.Enabled = True
            RadioButton3.Enabled = True
        End If
    End Sub
-------------------
timer
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        ProgressBar1.Increment(1)
        If ProgressBar1.Value = ProgressBar1.Maximum Then
            Timer1.Stop()
            MessageBox.Show("xxxxxxxxx", "xxxxxxxxx")
            If RadioButton1.Checked Then
losowanie_klucza:
                Dim AA As Double = Int(Rnd() * 9999)
                Dim BB As Double = Int(Rnd() * 9999)
                Dim CC As Double = Int(Rnd() * 9999)
                Dim DD As Double = Int(Rnd() * 9999)
                Dim EE As Double = Int(Rnd() * 9999)
                If AA > 1 And BB > 1 And CC > 1 And DD > 1 And EE > 1 Then
                    If AA + BB + CC + DD + EE = 35560 Then
                        Dim klucz As String = "Generated key: " & AA & " - " & BB & " - " & CC & " - " & DD & " - " & EE
                        klucz = klucz.Replace("2", "G")
                        klucz = klucz.Replace("4", "Z")
                        klucz = klucz.Replace("6", "S")
                        klucz = klucz.Replace("8", "N")
                        TextBox1.Text = klucz
                        Exit Sub
                    Else
                        GoTo losowanie_klucza
                    End If
                Else
                    GoTo losowanie_klucza
                End If
            End If
        Else
        End If
        ProgressBar1.Increment(1)
        If ProgressBar1.Value = ProgressBar1.Maximum Then
            Timer1.Stop()
            MessageBox.Show("xxxxxxxxx", "xxxxxxxxx")
            If RadioButton2.Checked Then
losowanie_klucza2:
                Dim AA As Double = Int(Rnd() * 9999)
                Dim BB As Double = Int(Rnd() * 9999)
                Dim CC As Double = Int(Rnd() * 9999)
                Dim DD As Double = Int(Rnd() * 9999)
                Dim EE As Double = Int(Rnd() * 9999)
                If AA > 1 And BB > 1 And CC > 1 And DD > 1 And EE > 1 Then
                    If AA + BB + CC + DD + EE = 38560 Then
                        Dim klucz2 As String = "Generated key: " & AA & " - " & BB & " - " & CC & " - " & DD & " - " & EE
                        klucz2 = klucz2.Replace("3", "F")
                        klucz2 = klucz2.Replace("4", "Z")
                        klucz2 = klucz2.Replace("5", "T")
                        klucz2 = klucz2.Replace("8", "N")
                        TextBox1.Text = klucz2
                        Exit Sub
                    Else
                        GoTo losowanie_klucza2
                    End If
                Else
                    GoTo losowanie_klucza2
                End If
            End If
        Else
        End If
        ProgressBar1.Increment(1)
        If ProgressBar1.Value = ProgressBar1.Maximum Then
            Timer1.Stop()
            MessageBox.Show("xxxxxxxxx", "xxxxxxxxx")
            If RadioButton3.Checked Then
losowanie_klucza3:
                Dim AA As Double = Int(Rnd() * 9999)
                Dim BB As Double = Int(Rnd() * 9999)
                Dim CC As Double = Int(Rnd() * 9999)
                Dim DD As Double = Int(Rnd() * 9999)
                Dim EE As Double = Int(Rnd() * 9999)
                If AA > 1 And BB > 1 And CC > 1 And DD > 1 And EE > 1 Then
                    If AA + BB + CC + DD + EE = 39160 Then
                        Dim klucz3 As String = "Generated key: " & AA & " - " & BB & " - " & CC & " - " & DD & " - " & EE
                        klucz3 = klucz3.Replace("4", "K")
                        klucz3 = klucz3.Replace("6", "P")
                        klucz3 = klucz3.Replace("9", "O")
                        klucz3 = klucz3.Replace("7", "M")
                        TextBox1.Text = klucz3
                        Exit Sub
                    Else
                        GoTo losowanie_klucza3
                    End If
                Else
                    GoTo losowanie_klucza3
                End If
            End If
        Else
        End If
        ProgressBar1.Increment(1)
        If ProgressBar1.Value = ProgressBar1.Maximum Then
            Timer1.Stop()
            MessageBox.Show("xxxxxxxxx", "xxxxxxxxx")
            If RadioButton4.Checked Then
losowanie_klucza4:
                Dim AA As Double = Int(Rnd() * 9999)
                Dim BB As Double = Int(Rnd() * 9999)
                Dim CC As Double = Int(Rnd() * 9999)
                Dim DD As Double = Int(Rnd() * 9999)
                Dim EE As Double = Int(Rnd() * 9999)
                If AA > 1 And BB > 1 And CC > 1 And DD > 1 And EE > 1 Then
                    If AA + BB + CC + DD + EE = 37551 Then
                        Dim klucz4 As String = "Generated key: " & AA & " - " & BB & " - " & CC & " - " & DD & " - " & EE
                        klucz4 = klucz4.Replace("1", "N")
                        klucz4 = klucz4.Replace("7", "C")
                        klucz4 = klucz4.Replace("3", "I")
                        klucz4 = klucz4.Replace("2", "P")
                        TextBox1.Text = klucz4
                        Exit Sub
                    Else
                        GoTo losowanie_klucza4
                    End If
                Else
                    GoTo losowanie_klucza4
                End If
            End If
        End If
    End Sub
End Class
------------
oczywiscie za pomoc poleca plusy
temat nowy gdyż wątki na temat keygenów które odkopałem na tym forum nie opisują mojego problemu
a kto wie, może się komus przyda taki gotowy kod (o ile ktoś w nim znajdzie błąd i poprawi)
pozdrawiam