[Help] Want progress bar to load several times [Solved]
2014-04-19, 03:44 AM, (This post was last modified: 2014-04-20, 06:52 PM by eni05.)
#1
Hello everyone,
i have build for my first time an app with Visual Studio 2013.
I have three buttons and i want progress bar to load every time that i click one of them and to display different statuses on labels depending on the clicked button.
I'm using this code that fotiskaf have posted here on forum:
But the problem is that if i click button 1 and everything goes fine till 100%, when i want to click button 2 it doesn't display anything except message box. So the progress bar it doesn't load again.
Can anyone tell me what should i add to my code to make this happen?
Hope i have been clear with my problem.

Thank you if you try to help me.
Reply
2014-04-19, 05:47 AM, (This post was last modified: 2014-04-19, 05:48 AM by vuli.)
#2
my knowlage in VB is just basic and i am not sure if this will work, but what, if you add another timer for button2.
(Timer2)

---------------------------------------------------------------------
hosting from $2,95/m
new2014 – 20% off recurring or new70 – 70% off first month
---------------------------------------------------------------------
NEW Proxy provider for Seo tools - Cupon "gsa" for 50% off 3mo


Reply
2014-04-19, 07:02 AM,
#3
If I understood you correctly your problem is that the Progressbar doesen't reset, right?

Just asign the value 0 to the progressbar if you click the button:

Code:
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        ProgressBar1.Value = 0
        Label1.Text = "0 %"
        Timer1.Start()
    End Sub
Latest Thanks - View all

eni05(2014-04-19 04:03 PM) 
Reply
2014-04-19, 09:46 AM,
#4
'hand written code get the logic

in -> button
{
timer1.start()
}

in -> timer1

if ProgressBar1.Value = 100 then
{
ProgressBar1.Value = 0
lable1.text = "code generated"
timer1.stop
else
progressbar1.value = progressbar1.value + 1
}

more :
https://www.youtube.com/watch?v=7TYxBGO0PoE
Reply
2014-04-19, 04:05 PM,
#5
(2014-04-19, 07:02 AM)pwned Wrote: If I understood you correctly your problem is that the Progressbar doesen't reset, right?

Just asign the value 0 to the progressbar if you click the button:

Code:
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        ProgressBar1.Value = 0
        Label1.Text = "0 %"
        Timer1.Start()
    End Sub

Thank you very much pwned for this. It's exactly what i wanted. I had only Timer1.Start() under my button. I added the other two lines and now it's ok.
Reply
2014-04-21, 01:12 AM,
#6
(2014-04-19, 04:05 PM)eni05 Wrote:
(2014-04-19, 07:02 AM)pwned Wrote: [/code]

Add me on skype: sunn.hyper
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Need a loading progress bar for wordpress! YoungArt 6 274 2017-08-26, 06:01 PM
Last Post: YoungArt
  [HELP] Cpagrip Content Locker ( On Page Load ) ashu55 3 1,206 2016-07-06, 12:36 AM
Last Post: ashu55
  My LP graphics/images takes a while to load upon opening (~5 second) Vrasquedrach 9 934 2016-06-22, 05:20 PM
Last Post: Vrasquedrach
  [Help] Imacro stop to check for page load Just4Fun 2 4,446 2014-12-11, 06:15 AM
Last Post: +44
  VB Help: Fetch/Load Facebook Profile Picture dahilan01 17 2,225 2014-09-29, 08:09 PM
Last Post: Face





About Us | Contact Us | CPA Elites | Advertise | Stats | Staff Team

© 2013-2017 CPA Elites Ltd
Enhanced by MyBB and WallBB
Return to top