I am developing winform(c#) that start/stop/restart windows services. I want to put a progress bar till the action is completed. I am new to .net programming. Kindly help me on to achieve this.
I am developing winform(c#) that start/stop/restart windows services. I want to put a progress
Share
You cannot show meaningful progress when you don’t know how long it takes. You can’t know, services take anywhere from 1 to 30 seconds to start. All you can do is show a “I’m not dead, working on it” indicator to the user. ProgressBar supports that, set the Style property to “Marquee”.
You’ll also need to start the service in a worker thread to avoid your UI from freezing. That’s best done with a BackgroundWorker. Make it look similar to this: