ITPub博客

首页 > > > c# winform大神进

c# winform大神进

作者:post200 时间:2019-11-07 13:41:30 0 删除 编辑

请教大神。。第一段代码和第二段代码有什么区别。。。????

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/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2019-07-17

  • 博文量
    124
  • 访问量
    17963