Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

Problem przy użyciu


Rekomendowane odpowiedzi

Opublikowano

Witam Mam taki oto kod nie wiem w czym jest blad ale gdy odpalam "rozpocznij generowanie" to pokazuje sie odrazu kod a nie dopiero jak sie progressbar sie skonczy :

KOD!:

Public Class Form1


    Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click


    End Sub


    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Timer1.Start()




        TextBox1.Text = Generate() & "-" & Generate() & "-" & Generate() & "-" & Generate() & "-" & Generate()
    End Sub
    Private Function Generate() As String
        Dim IntRnd(1) As Object
        Dim intStep(1) As Object
        Dim strName(1) As Object
        Dim intNameLength(1) As Object
        Dim intLength(1) As Object
        Dim strInputstring(1) As Object




        strInputstring(1) = "1234567890123456789012345674ABCDEFGHIJKLMNOPRSTUVWXYZ"
        intLength(1) = Len(strinputstring(1))
        intNameLength(1) = 3
        Randomize()
        strName(1) = ""
        For intStep(1) = 1 To intNameLength(1)
            intRnd(1) = Int((intLength(1) * Rnd()) + 1)
            strname(1) = strName(1) & Mid(strInputstring(1), intRnd(1), 1)
        Next




        Generate = strName(1)




    End Function




    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() * 1)
            Select Case key
                Case 1
            End Select
            MessageBox.Show("GiftCode Wygenerowano", "Pomyślnie!")
        Else
            If ProgressBar1.Value = 1 Then
                Label4.Text = "Ładowanie"
            End If
            If ProgressBar1.Value = 15 Then
                Label4.Text = "Łączenie ze serwerem"
            End If
            If ProgressBar1.Value = 25 Then
                Label4.Text = "Wczytywanie ustawień konta"
            End If
            If ProgressBar1.Value = 45 Then
                Label4.Text = "Wczytywanie danych..."
            End If
            If ProgressBar1.Value = 55 Then
                Label4.Text = "Wczytywanie danych - zakończone!"
            End If
            If ProgressBar1.Value = 80 Then
                Label4.Text = "Łączenie z bazą..."
            End If
            If ProgressBar1.Value = 86 Then
                Label4.Text = "Wczytano pomyślnie!"
            End If
            If ProgressBar1.Value = 95 Then
                Label4.Text = "Proces zakończył się SUKCESEM!"
            End If
        End If


    End Sub


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

1377531174-U173186.png

Opublikowano

Kolego, serio? Po pierwsze temat staraj się dawać związany z "problemem" a po drugie to przejrzyj chociaż kod który podesłał ci kolega wyżej.

 

mała podpowiedź: 

 

If ProgressBar1.Value = 100 Then
//Kod
End If 

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

×
×
  • Dodaj nową pozycję...