首页 > 其他 > 详细

Invoke BeginInvoke

时间:2015-11-02 15:19:47      阅读:245      评论:0      收藏:0      [点我收藏+]

http://www.codeproject.com/Articles/10311/What-s-up-with-BeginInvoke

 

http://www.codeproject.com/Articles/37642/Avoiding-InvokeRequired

static class ControlExtensions
{
    static public void UIThread(this Control control, Action code)
    {
        if (control.InvokeRequired)
        {
            control.BeginInvoke(code);
            return;
        }
        code.Invoke();
    }
    
    static public void UIThreadInvoke(this Control control, Action code)
    {
        if (control.InvokeRequired)
        {
            control.Invoke(code);
            return;
        }
        code.Invoke();
    }
}

 

http://stackoverflow.com/questions/782274/using-c-sharp-methodinvoker-invoke-for-a-gui-app-is-this-good

 

http://stackoverflow.com/questions/1167771/methodinvoker-vs-action-for-control-begininvoke

 

http://stackoverflow.com/questions/253138/anonymous-method-in-invoke-call

 

Invoke BeginInvoke

原文:http://www.cnblogs.com/chucklu/p/4930131.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!