Simple Progress Bar Tutorial

Pubblicato il: 01 novembre 2011
sul canale di: Ashutosh Bhaskar Sharma
2,165
3

Hey Youtube.. Follow me @Ashutoshbsharma :)
You also need a timer in your project... :)
not able to put some signs here...so read the code once :)
comment :)
=========codes==============
EXIT BUTTON========
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
End
End Sub
=====================
START BUTTON=========
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Timer1.Start()
Button3.Enabled = False
Button4.Enabled = True
TextBox1.Enabled = False
End Sub
========================
TIMER===================

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Dim r As VariantType
For i = 5 To 10
r = Rnd(i)
ProgressBar1.Increment(r)
Next i
If ProgressBar1.Value = ProgressBar1.Maximum Then
Timer1.Stop()
MsgBox("Completion! :) ", MsgBoxStyle.Information, vbOKOnly)
If vbOKOnly = MsgBoxStyle.OkOnly Then
Button4.Enabled = False
Button3.Enabled = True
End If
End If
End Sub
===========================
FORM LOAD=================

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Button4.Enabled = False
TextBox1.Enabled = False
End Sub
===========================
STOP BUTTON================
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
Timer1.Stop()
Button3.Enabled = True
Button4.Enabled = False
End Sub
============================
MANUAL VALUE BUTTON=========
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If TextBox1.Text = "" Then
Else
If TextBox1.Text (grater than ) 100 Then
MsgBox("Error,You Can Enter Numbr From 1 TO 100", MsgBoxStyle.Critical, "Error")
Else
ProgressBar1.Value = TextBox1.Text
End If
If ProgressBar1.Value = 100 Then
MsgBox("Completion! :) ", MsgBoxStyle.Information, "Completion! :) ")
Timer1.Stop()
End If
End If
TextBox1.Enabled = True
End Sub
End Class


In questa pagina del sito puoi guardare il video online Simple Progress Bar Tutorial della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Ashutosh Bhaskar Sharma 01 novembre 2011, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 2,165 volte e gli è piaciuto 3 spettatori. Buona visione!