后台线程调用前台页面上的内容:windows Form

BackgroundThreadFunction()

{

   Invoke(new ShowMessage(Show), strAccount, e.Message);

}

 

private delegate void ShowMessage(string strAccount, string Exception);

private void Show(string strAccount, string Exception)
        {
            lblInfo.Text = "获取" + strAccount;
            lblException.Text =strAccount +  " " + Exception;
        }

posted on 2012-07-26 10:27  冰危节奏  阅读(166)  评论(0编辑  收藏  举报

导航