本文介绍了航空玻璃在MDI父母身上延伸的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我设法利用Vista/7中的DwmExtendFrameIntoClientArea将玻璃效果扩展为一种形式.但是,我无法在设置为mdi容器的表单上发生这种情况.玻璃部分不再画了-它看起来是白色的.请注意,我不是在谈论mdi父级中的子级,而是真正的主窗体本身.

是否有人对如何使它起作用有任何建议?

I have managed to make use of the DwmExtendFrameIntoClientArea in Vista/7 to extend the glass effect into a form. However I cannot get this to happen on a form which is set as an mdi container. The glass portion just doesn't draw any more  - it appears white. Note I'm not talking about the children inside the mdi parent, but on the actual main form itself.

Does anyone have any suggestions on how to get this working?

推荐答案

 

 

.Controls.OfType( Of MdiClient ).ElementAt(0).BackColor = 颜色 .黑色

Me.Controls.OfType(OfMdiClient).ElementAt(0).BackColor = Color.Black

它的作用是改变了mdi容器的背景颜色控制为黑色,以便显示航空玻璃.

请注意,mdi子级将拥有如果将它们涂成黑色,效果也一样.将其设置为(隐藏的)"DoubleBuffered" True的属性将修复 在客户区域中,但是对于标题栏,我所能想到的就是将边框样式设置为无,然后绘制并编程自己的边框:-)

Note that the mdi children will have the effect also if they are painted black. Setting thier (hidden) "DoubleBuffered" property to True will fix that in the client area, but as for the title bar, all I can think of is make the borderstyle to none and then just draw and program my own border :-)


这篇关于航空玻璃在MDI父母身上延伸的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-20 20:30