How to create a form that contains only a progress bar in c# [closed]

If you want to create it programatically, then you could just recreate the code that the designer pre-builds for you, and tweak it to your needs, like so;

this.progressLoadingBar = new System.Windows.Forms.ProgressBar();
this.progressLoadingBar.Location = new System.Drawing.Point(10, 227);
this.progressLoadingBar.Name = "progressLoadingBar";
this.progressLoadingBar.Size = new System.Drawing.Size(100, 23);
this.progressLoadingBar.TabIndex = 9;
this.Controls.Add(this.progressLoadingBar);

Here. just make sure “this” is the context of your form. if you wanted to tweak further, use the intellisense and look through your options, or else google is your best friend, the MSDN page can be found here:

http://msdn.microsoft.com/en-us/library/system.windows.forms.progressbar.aspx

Leave a Comment