namespace progressSample
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
} private void button1_Click(object sender, EventArgs e)
{
int j;
for (int i = 0; i <= 1000000; i++)
{
Math.DivRem(i, 10000, out j);
if (j == 0)
{
progressBar1.PerformStep();
}
}
} private void button2_Click(object sender, EventArgs e)
{
progressBar1.Value = 0;
} private void progressBar1_Click(object sender, EventArgs e)
{ } private void pictureBox1_Click(object sender, EventArgs e)
{
MessageBox.Show("It's a picture!");
} private void button3_Click(object sender, EventArgs e)
{
MessageBox.Show(textBox1.Text);
}
}
}没有加最后一个private 时运行正常,加了这个之后,不能运行了,提示
错误 1 无法将文件“obj\Debug\progressSample.exe”复制到“bin\Debug\progressSample.exe”。文件“bin\Debug\progressSample.exe”正由另一进程使用,因此该进程无法访问该文件。 progressSample
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
} private void button1_Click(object sender, EventArgs e)
{
int j;
for (int i = 0; i <= 1000000; i++)
{
Math.DivRem(i, 10000, out j);
if (j == 0)
{
progressBar1.PerformStep();
}
}
} private void button2_Click(object sender, EventArgs e)
{
progressBar1.Value = 0;
} private void progressBar1_Click(object sender, EventArgs e)
{ } private void pictureBox1_Click(object sender, EventArgs e)
{
MessageBox.Show("It's a picture!");
} private void button3_Click(object sender, EventArgs e)
{
MessageBox.Show(textBox1.Text);
}
}
}没有加最后一个private 时运行正常,加了这个之后,不能运行了,提示
错误 1 无法将文件“obj\Debug\progressSample.exe”复制到“bin\Debug\progressSample.exe”。文件“bin\Debug\progressSample.exe”正由另一进程使用,因此该进程无法访问该文件。 progressSample
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货