且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

windows窗体中的绘画问题

更新时间:2023-12-06 12:11:58

在表单上将 DoubleBuffering 设置为 true.这应该可以解决问题.

Set DoubleBuffering to true on the form. This should sort the problem out.

除非您自己使用 Graphics 对象绘制内容?你是吗?

Unless you are drawing the stuff yourself using a Graphics object? Are you?

如果您然后查找 Double缓冲,你可以在几个地方找到这个,比如 鲍勃·鲍威尔代码项目.

If you are then look up Double Buffering, you can find out about this at a few places, such as Bob Powell and Code Project.

如果它没有,并且您想快速解决它,在上下文菜单折叠事件中,您可以调用 form.Refresh() 但要避免这种情况所有成本.

If it doesn't and you want a quick hack to get around it, on the context menu collapse event you could call form.Refresh() but avoid this at all costs.