开发者

Program stop at a statement (backgound.Visible=true). Why?

This is my program:

{  
   statement1;  
   ...
   background.Visbile = true;
   ...
   statementx;
}

When I run this program, it stops at background.Visible=true; statement. Anybody know why?

More information:

background is TableLayoutPanel object.

'stop' mean program freeze and don't run to next statement.

I can't debug this program, only wri开发者_JS百科te log. Application just not proceed to the next line.


Your code might have a cross-thread access problem. You might be getting an exception thrown, but since you're not debugging, it might be swallowed by the code elsewhere, and not shown to you, making your application appear frozen.

If you're using Threads or BackgroundWorkers in your code, you should perform operations on the UI components by checking if InvokeRequired, and then calling Invoke or BeginInvoke.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜