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;
...........

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...