Jump to content

Recommended Posts

Posted

Can't understand why this one dont  work, it seems logic..

I have a Progress Bar, with name Prog... i want increase value of progresse bar every 1 second by 1...

 

Any suggestion...

 

System.Timers.Timer aTimer = new System.Timers.Timer();
             aTimer.Elapsed += new ElapsedEventHandler(OnTimedEvent);

 

       

 private static void OnTimedEvent(object source, ElapsedEventArgs e)
         {
              //MessageBox.Show("Kurwa");
         }

 

for (Prog.Value = 0; Prog.Value < 100; Prog.Value++)
                { aTimer.Interval = 1000; aTimer.Enabled = true; }

Posted

Btw it was so simple ;p

 

       

private void Tim_Tick(object sender, EventArgs e)
       {
           if (Prog.Value < 100)
           {
               Prog.Value++;
           }
       }

 

Just must enable it where you want

 

Errorlbl.Visible = true;
                Tim.Enabled = true;
...........

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..