Windows表格闪烁 [英] Windows forms flickering

查看:118
本文介绍了Windows表格闪烁的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的Windows应用程序具有3种形式.每种都有不同的背景图像.加载这些形式时会出现闪烁(或延迟).我能解决这个问题吗...

My windows application have 3 forms.Each have different background images.while loading these forms there is a flickering(or delay).Can i solve this problem...

推荐答案

您是否尝试过this.DoubleBuffered = true;


此问题可能归因于您正在使用应用程序的主线程,以完成您的应用程序所需的任何处理加载新表格.

尝试实时更新进度条的值时遇到了类似的问题,因为发生的处理是线程阻塞.视觉效果是闪烁或微光的效果.当我分解应用程序使其成为多线程时,该问题已解决.一旦处理在单独的线程上进行,进度条将正确更新,从而提供视觉反馈.

我并不是说这是问题所在,而是根据我的经验,鉴于您所描述的可能是根本原因.

劳伦斯
This issue could be down to the fact you''re using the main thread of the application, to complete any processing that is required when your new forms are loaded.

I have had similar issues when attempting to update the value of a progress bar in real time, as the processing that was occurring was thread blocking. The visual effect was that of a flicker or shimmer. The issue was solved when I broke down the application so that it was multi-threaded. Once the processing occurred on a separate thread the progress bar updated correctly giving visual feedback.

I''m not saying that this is the issue, but from my experience, given what you have described could be the root cause.

Laurence


这篇关于Windows表格闪烁的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆