最大化子窗体时避免闪烁 [英] avoid flickering when Maximized Child Forms

查看:116
本文介绍了最大化子窗体时避免闪烁的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 frm.MdiParent = MDIMain 
frm.WindowState = FormWindowState.Maximized
frm.Show()



我使用上面的代码在最大化视图中打开mdiparent中的表单打开子表单时闪烁。当最大化子窗体

解决方案

Moses Geo写道:

时,如何避免闪烁

如何使用双缓冲或MDI的替代方法

首先,双缓冲。



你明白为什么吗大大减少闪烁?如果没有,我可以解释,但这需要一些努力。



这是如何启用它: http://msdn.microsoft.com/en-us/library/system.windows.forms。 control.doublebuffered(v = vs.110).aspx [ ^ ]。



对于MDI,你可以做很多事情没有它,更容易实现设计,质量更好。 MDI甚至被微软高度劝阻,事实上,微软将其从WPF中删除并且很难支持它。更重要的是,如果您使用MDI,您将吓跑所有用户。只是不要。请参阅:

http://en.wikipedia.org/wiki/Multiple_document_interface#Disadvantages [ ^ ],

如何在WPF中创建MDI父窗口? [ ^ ]。



我可以解释做什么。请看我过去的答案:

如何在WPF中创建MDI父窗口? [解决方案2 ],

关于在WPF中使用MDI窗口的问题 [ ^ ],

麦当劳给出错误 [ ^ ],

如何设置子窗体最大化,最后一个子窗体最小化 [ ^ ]。



-SA

frm.MdiParent = MDIMain
            frm.WindowState = FormWindowState.Maximized
           frm.Show()


I have used the above code to open a form in a mdiparent in a Maximized view While opening the child form flickering. How can I avoid flickering when Maximized Child Forms

解决方案

Moses Geo wrote:


How to use double buffering or what is an alternative for MDI

First, double buffering.

Do you understand why it highly reduce flicker? If not, I can explain, but it would take some effort.

This is how to enable it: http://msdn.microsoft.com/en-us/library/system.windows.forms.control.doublebuffered(v=vs.110).aspx[^].

As to MDI, you can do much easier to implement design without it, with much better quality. MDI is highly discouraged even by Microsoft, in fact, Microsoft dropped it out of WPF and will hardly support it. More importantly, you will scare off all your users if you use MDI. Just don't. Please see:
http://en.wikipedia.org/wiki/Multiple_document_interface#Disadvantages[^],
How to Create MDI Parent Window in WPF?[^].

I can explain what to do instead. Please see my past answers:
How to Create MDI Parent Window in WPF? [Solution 2],
Question on using MDI windows in WPF[^],
MDIContainer giving error[^],
How to set child forms maximized, last childform minimized[^].

—SA


这篇关于最大化子窗体时避免闪烁的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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