Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27349

VS 2010 Need help !

$
0
0
Hello .

I wanted to ask how to add this code to the finished progress bar popped up a window that says "ok". And second question, if I set the progress bar after graduating jumped text, but it pops up before the progress bar reaches the end, how to correct it?

Code:

Public Class Form2

    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()
            Dim key As Integer
            key = (Rnd() * 9)
LOL_LOL:
            Dim AA As Decimal = Int(Rnd() * 10000)
            Dim BB As Decimal = Int(Rnd() * 10000)
            Dim CC As Decimal = Int(Rnd() * 10000)
            Dim DD As Decimal = Int(Rnd() * 10000)
            Dim EE As Decimal = Int(Rnd() * 10000)
            If AA > 1000 And BB > 1000 And CC > 1000 And DD > 1000 And EE > 1000 Then
                If AA + BB + CC + DD + EE - 35927 Then
                    Dim serial As String = AA & "-" & BB & "-" & CC & "-" & DD & "-" & EE
                    serial = serial.Replace("2", "G")
                    serial = serial.Replace("4", "Z")
                    serial = serial.Replace("6", "S")
                    serial = serial.Replace("8", "N")
                    TextBox1.Text = serial
                    Exit Sub

                Else
                    GoTo lol_lol
                End If
            Else
                GoTo LOL_LOL
            End If

        End If



    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Timer1.Start()
        ProgressBar1.Value = ProgressBar1.Minimum
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Application.Exit()
    End Sub
End Class


Viewing all articles
Browse latest Browse all 27349

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>