ProgressBar

ProgressBar Programmierung
When beginning a long task, make the ProgressBar visible. Set its Min and Max properties to represent the task.
As the task progresses, set the ProgressBar's Value property to indicate the amount of the task completed.
When the task is finished, set Visible to false for the ProgressBar.
Private Sub cmdPerformTask_Click()
cmdPerformTask.Enabled = False Don't let the user click this till we are done with this task.
MousePointer = vbHourglass
pbTaskProgress.Value = pbTaskProgress.Min Start the progress bar at zero.
pbTaskProgress.Visible = True
tmrTaskTimer.Enabled = True Enable the timer to start the long task.
End Sub
Private Sub Form_Load()
cmdPerformTask.Caption = "Perform Task"
pbTaskProgress.Visible = False
pbTaskProgress.Align = vbAlignBottom
pbTaskProgress.Min = 0
pbTaskProgress.Max = 100
tmrTaskTimer.Interval = 100
tmrTaskTimer.Enabled = False
End Sub
Private Sub tmrTaskTimer_Timer()
pbTaskProgress.Value = pbTaskProgress.Value + 10 Increase the ProgressBar's value.
If pbTaskProgress.Value >= pbTaskProgress.Max Then If we're done, reenable the button.
pbTaskProgress.Visible = False
cmdPerformTask.Enabled = True
tmrTaskTimer.Enabled = False
MousePointer = vbDefault
End If
End Sub
Sponsoren und Investoren

Sponsoren und Investoren sind jederzeit herzlich willkommen!
Wenn Sie die Information(en) auf dieser Seite interessant fanden, freuen wir uns über eine kleine Spende. Empfehlen Sie uns bitte auch in Ihren Netzwerken (z. B. Twitter, Facebook oder Google+). Herzlichen Dank!

Nach oben Sitemap
Impressum & Kontakt