双线程 的例子 谁有双线程的例子 给个让学习下 谢谢 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 http://topic.csdn.net/u/20080523/15/5f8057ff-7e59-4aa2-8d82-18a5fae5af39.html来自 using System;using System.Windows.Forms;namespace WindowsApplication39{ public partial class Form1 : Form { delegate void dShowForm(); Form2 frm = new Form2(); public Form1() { this.InitializeComponent(); } //显示窗体 void ShowForm() { if (this.InvokeRequired) { this.Invoke(new dShowForm(this.ShowForm)); } else { frm.ShowDialog(this); } } //控制进度 void SetProgress() { for (int i = 1; i <= 100; i++) { if (frm.DialogResult == DialogResult.Cancel) { //判断取消 break; } else { //模拟进度 frm.SetProgress(100, i); System.Threading.Thread.Sleep(50); } } } private void button1_Click(object sender, EventArgs e) { new System.Threading.Thread(new System.Threading.ThreadStart(ShowForm)).Start(); new System.Threading.Thread(new System.Threading.ThreadStart(SetProgress)).Start(); } }}来自jinjazz 在线等,多线程求助 关于c#连接Excel获取表的问题 请教一个存储过程的问题 CSDN那里改用户名啊? 一个网站中有两个WEB.config应该注意什么? WPF VirtualizingStackPanel 提问 我是C#初学者,请大家帮忙解释一下这段代码! 如何获得本机 IE 的版本? Hashtable的顺序问题 为啥没人指点一下,在文件框里,如何才能只输入数值,按其它键无效呢????????? (tigerbananaapple ) c#点按钮弹出水晶报表 求解调用存储过程出错
来自
using System;
using System.Windows.Forms;namespace WindowsApplication39
{
public partial class Form1 : Form
{ delegate void dShowForm();
Form2 frm = new Form2(); public Form1()
{
this.InitializeComponent();
}
//显示窗体
void ShowForm()
{
if (this.InvokeRequired)
{
this.Invoke(new dShowForm(this.ShowForm));
}
else
{
frm.ShowDialog(this);
}
}
//控制进度
void SetProgress()
{
for (int i = 1; i <= 100; i++)
{
if (frm.DialogResult == DialogResult.Cancel)
{
//判断取消
break;
}
else
{
//模拟进度
frm.SetProgress(100, i);
System.Threading.Thread.Sleep(50);
}
}
}
private void button1_Click(object sender, EventArgs e)
{
new System.Threading.Thread(new System.Threading.ThreadStart(ShowForm)).Start();
new System.Threading.Thread(new System.Threading.ThreadStart(SetProgress)).Start();
}
}
}
来自jinjazz