Try this:
private void button1_Click(object sender, EventArgs e)
{
if (progressBar1.Value < progressBar1.Maximum)
progressBar1.Value++;
}
But note, you cannot set Value
to a higher number than Maximum
More Related Contents:
- Add parameter to Button click event
- How to create a form that contains only a progress bar in c# [closed]
- Maximum value in the track bar
- How do I prevent the app from terminating when I close the startup form?
- ASP.NET MVC Conditional validation
- c# open a new form then close the current form?
- How to hide close button in WPF window?
- C# WebBrowser Control – Form Submit Not Working using InvokeMember(“Click”)
- How can we show progress bar for upload with FtpWebRequest
- Reset the value of textarea after form submission
- Windows Forms ProgressBar: Easiest way to start/stop marquee?
- How to access HTML form input from ASP.NET code behind
- FtpWebRequest FTP download with ProgressBar
- Using WebClient or WebRequest to login to a website and access data
- Asynchronous File Download with Progress Bar
- Drawing a transparent button
- How do I display progress during a busy loop?
- How to programmatically log in to a website to screenscape?
- File Copy with Progress Bar
- How do I create 5 buttons and assign individual click events dynamically? [closed]
- Windows 7 progress bar in taskbar in C#?
- Access form component from another class
- C# Change A Button’s Background Color
- Programmatically changing button icon in WPF
- Closing a form and then call another one
- SendKey.Send() Not working
- How to show form in front in C#
- How do I get all controls of a form in Windows Forms?
- How do you click a button in a webbrowser control?
- WPF – Remove focus when clicking outside of a textbox