Gå til innhold

Hva er galt med denne koden? ProgressBar


Anbefalte innlegg

kunne noen fortelle meg hva som er galt med dette scriptet?

 

VB vill ikke tilate "ProgressBar1"

 

Public Class Form1
   Private Sub Buttonstart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Buttonstart.Click
       If Timer1.Enabled = False Then
           Do Until
               Timer1.Enabled = True
           Loop
       End If
   End Sub


   Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick

       ProgressBar1.Minimum(0)
       ProgressBar1.Maximum(100)
       ProgressBar1.Step(1)
       ProgressBar1.PerformStep()

   End Sub

   Private Sub Buttonstop_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Buttonstop.Click

       If Timer1.Enabled = True Then
           Do Until
               Timer1.Enabled = False
           Loop
       End If
   End Sub

End Class

Lenke til kommentar
Videoannonse
Annonse
  • 4 uker senere...
  • 7 måneder senere...

kunne noen fortelle meg hva som er galt med dette scriptet?

 

VB vill ikke tilate "ProgressBar1"

 

Public Class Form1
   Private Sub Buttonstart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Buttonstart.Click
       If Timer1.Enabled = False Then
           Do Until
               Timer1.Enabled = True
           Loop
       End If
   End Sub


   Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick

       ProgressBar1.Minimum(0)
       ProgressBar1.Maximum(100)
       ProgressBar1.Step(1)
       ProgressBar1.PerformStep()

   End Sub

   Private Sub Buttonstop_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Buttonstop.Click

       If Timer1.Enabled = True Then
           Do Until
               Timer1.Enabled = False
           Loop
       End If
   End Sub

End Class

 

Public Class Form1
   Private Sub Buttonstart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Buttonstart.Click
       If Timer1.Enabled = False Then
           Do Until
               Timer1.Enabled = True
               ProgressBar1.Minimum = 0
               ProgressBar1.Maximum = 100
           Loop
       End If
   End Sub


   Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick

       ProgressBar1.Value += 1

   End Sub

   Private Sub Buttonstop_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Buttonstop.Click

       If Timer1.Enabled = True Then
           Do Until
               Timer1.Enabled = False
           Loop
       End If
   End Sub

End Class

Lenke til kommentar

Opprett en konto eller logg inn for å kommentere

Du må være et medlem for å kunne skrive en kommentar

Opprett konto

Det er enkelt å melde seg inn for å starte en ny konto!

Start en konto

Logg inn

Har du allerede en konto? Logg inn her.

Logg inn nå
×
×
  • Opprett ny...