Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB progress VB.NET
Help me with LABEL in progress Bar:
 

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
 
ProgressBar1.Maximum = 200
 
ProgressBar1.Value = ProgressBar1.Value + 1
 
If ProgressBar1.Value = ProgressBar1.Maximum Then
 
Label1.Visible = True
 
Label1.Text = "I love you"
 
Timer1.Enabled = False
 
ProgressBar1.Value = 0
 
Beep()
 
ProgressBar1.Visible = False
 
End If
 
End Sub

 
As you see, once the progress bar stops, it displays the label "I love you", however, I want that once the progress bar starts, it displays the label, and also how to display more texts until the progress bar finish?
 

 
I mean I want to display also some other texts like "I can't live without you", "You are my life", just after the label I love you has been displayed. The process must start when the progress bar starts and finish when the progress bar finishes. Each label must be changed in each 3 seconds.
Posted 7-Apr-11 2:37am
555336631
Edited 7-Apr-11 2:39am
d@nish 73.2K
v2

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

There is something called ReportProgress event associated with the progress bar. You can probably use that to update the text.
  Permalink  
Comments
SAKryukov at 7-Apr-11 7:49am
   
Absolutely, my 5.
But I smell how it may end up. OP will ask again and again and it may end up with parallelism (and maybe even DoEvents instead of thread), but finally comes to a thread. Let's see!
--SA
d@nish at 7-Apr-11 7:58am
   
I will go offline in few minutes for sometime. Then it will be intermittent internet access since I will be travelling. So all the best to you and others. :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 269
1 OriginalGriff 240
2 CPallini 195
3 Maciej Los 177
4 BillWoodruff 173
0 OriginalGriff 5,655
1 DamithSL 4,506
2 Maciej Los 3,997
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,180


Advertise | Privacy | Mobile
Web01 | 2.8.141216.1 | Last Updated 7 Apr 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100