|
-
Jun 26th, 2002, 12:28 AM
#1
Thread Starter
Junior Member
Process bars...
How can i make a process bar go from like 10 to 90, 7 or 8 times?
-
Jun 26th, 2002, 12:54 AM
#2
I honestly dont think this is what you want, but I gave it a try anyways 
VB Code:
Private Sub Timer_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer.Tick
Static counter As Integer = 0
If counter = 0 Then
pBar.Value = 10
End If
If pBar.Value < 90 Then
pBar.Value += 10
Else
pBar.Value = 10
counter += 1
End If
If counter = 7 Then
Timer.Enabled = False
counter = 0
End If
End Sub
again, if that's not your answer, you have to exPLAIN your question more!
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Jun 26th, 2002, 01:10 AM
#3
Thread Starter
Junior Member
No... That wasn't what i was looking for/didn't work.
Okay. You have an empty process bar right?
Now i want it so when the app loads the proccess
bar will go from the value of 0 to the value 100
3 times.
|= 1 block in the process bar.
|-----------------------> ||||||||||
|-----------------------> ||||||||||
|-----------------------> ||||||||||
-
Jun 26th, 2002, 01:29 AM
#4
well the code that I gave you will move it from 10 to 90 for 7 times. You have to add a timer control and name it "Timer" and set the enabled property to true. Modify that and make it work for what you want.
I dont know if there is a good way to get rid of the stupid timer control though
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Jun 26th, 2002, 02:13 AM
#5
Thread Starter
Junior Member
-
Jun 26th, 2002, 02:17 AM
#6
-
Jun 26th, 2002, 02:18 AM
#7
Thread Starter
Junior Member
Wait a sec... its recognizing the code, but when i executed the program it didn't do anything. it just stayed on 10 (which is 2 bars)
Private Sub Timer_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Static counter As Integer = 0
If counter = 0 Then
ProgressBar1.Value = 10
End If
If ProgressBar1.Value < 90 Then
ProgressBar1.Value += 10
Else
ProgressBar1.Value = 10
counter += 1
End If
If counter = 7 Then
Timer1.Enabled = True
counter = 0
End If
End Sub
Thats what i have in. Tell me if its wrong
-
Jun 26th, 2002, 02:25 AM
#8
-
Jun 26th, 2002, 02:40 AM
#9
Thread Starter
Junior Member
So put Form_Load
Timer.Enabled = True
into a button?....
its not recognizing the Form_Load
-
Jun 26th, 2002, 03:03 PM
#10
sorry I'm confusing you 
VB Code:
Private Sub Timer_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer.Tick
Static counter As Integer = 0
If pBar.Value < 90 Then
pBar.Value += 10
Else
pBar.Value = 10
counter += 1
End If
If counter = 7 Then
Timer.Enabled = False
counter = 0
End If
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Timer.Enabled = True
End Sub
try that
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Jun 26th, 2002, 03:09 PM
#11
sorry I'm confusing you 
VB Code:
Private Sub Timer_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer.Tick
Static counter As Integer = 0
If pBar.Value < 90 Then
pBar.Value += 10
Else
pBar.Value = 10
counter += 1
End If
If counter = 7 Then
Timer.Enabled = False
counter = 0
End If
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Timer.Enabled = True
End Sub
try that
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|