Avatar of darkpomix
 asked on

how can i simulate a Progress bar in c# (Visual Studio.net)

how can i simulate a Progress bar in c# (Visual Studio.net),  please help, with this ,  i try for many times but dont work,  if any can help me ????


Avatar of undefined
Last Comment
Mike Tomlinson

8/22/2022 - Mon
Mike Tomlinson

Could you give some details please?

Are you trying to simulate some kind of process with a normal progressbar?

Or do you want to make you own progressbar?


no ,  i use a simple progressbar that is included in vs.net , and i need to simulate a process ,

Your question isn't making much sense, darkpomix. What are you trying to simulate? Can you give an example? Are you trying to inherit the progress bar to create your own control? Please be more specific.


Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy

only simulate a process,  with a counter   i guess,   the progress need to fill up  the progressbar, with a standard progressbar,  not my own , thanks
Mike Tomlinson

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Mike Tomlinson

Something a little more "fluid":

        private void button1_Click(object sender, EventArgs e)
            button1.Enabled = false;

            Random R = new Random();
            progressBar1.Value = progressBar1.Minimum;

            for (int i = progressBar1.Minimum; i < progressBar1.Maximum; i++)
                System.Threading.Thread.Sleep(R.Next(50, 250));


            button1.Enabled = true;