关于使用ProgressBar的问题 timer控件自己不是一个线程吗? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 多线程,,,,ProcessBar里面的进度条做个假的 试试看这样:private void button1_Click(object sender, System.EventArgs e){ progressBar1.Step = 1; timer1.Start (); Application.DoEvents(); …… …… ……数据库查询…… …… …… timer1.Stop ();}//timer_tickprivate void timer1_Tick(object sender, System.EventArgs e){if(progressBar1.Value < 100 ){ progressBar1.PerformStep (); progressBar1.Refresh();}else{ timer1.Stop ();}} C#窗体应用程序问题 屏蔽combox的鼠标键盘消息 急!c#中怎么用正则表达式抽取网页内容!(高分求救) 关于自定义事件的问题? 这条sql语句错在哪里? 请教关于C#程序做的登录窗口问题 打包的问题多多,,,顶者有粪。 VS.NET新建不项目怎么办,有人遇到过这个问题么?? 关于Updater Application Block的问题 listView中怎样动态修改数据。 用户控件绑定问题?(求助) 求:数据从一个数据库中转到另一个数据库的解决方案!表结构相同!
ProcessBar里面的进度条做个假的
private void button1_Click(object sender, System.EventArgs e)
{
progressBar1.Step = 1;
timer1.Start ();
Application.DoEvents();
…… …… ……
数据库查询
…… …… ……
timer1.Stop ();
}
//timer_tick
private void timer1_Tick(object sender, System.EventArgs e)
{
if(progressBar1.Value < 100 )
{
progressBar1.PerformStep ();
progressBar1.Refresh();
}
else
{
timer1.Stop ();
}
}