主题:求助!关于C#进度条
如下程序,我想在窗体From1上加个进度条,来表示S++到100次的完成进度
老鸟帮忙啊,谢谢!
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace WindowsApplication1
{
public partial class Form1 : Form
{
int s=0;
public void Exp()
{
while (s < 100)
{
s++;
textBox1.Text = s.ToString();
Application.DoEvents();
}
}
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Exp();
}
}
}
老鸟帮忙啊,谢谢!
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace WindowsApplication1
{
public partial class Form1 : Form
{
int s=0;
public void Exp()
{
while (s < 100)
{
s++;
textBox1.Text = s.ToString();
Application.DoEvents();
}
}
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Exp();
}
}
}