首页 > > > c# winform大神进
请教大神。。第一段代码和第二段代码有什么区别。。。????
1.
private void button1_Click(object sender, EventArgs e)
{
tr = new Thread(new ParameterizedThreadStart(Do));
tr.IsBackground = true;
tr.Start(this);
Application.DoEvents();
}
private void Do(object f)
{
this.Invoke(new Action(() =>
{
.........耗时操作
}));
}
2.
private void button1_Click(object sender, EventArgs e)
{
tr = new Thread(new ParameterizedThreadStart(Do));
tr.IsBackground = true;
tr.Start(this);
}
private void Do(object f)
{
this.Invoke(new Action(() =>
{
Application.DoEvents();
.............................耗时操作.....
}));
}
3.去哪里可以查看
Windows消息列表
WM_NULL = 0x0000,
WM_CREATE = 0x0001,
这些消息的中文意思??请帖网址。。感激
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/2249/viewspace-3120994/ ,如需转载,请注明出处,否则将追究法律责任。