MDI容器形式的背景图片 [英] background image for mdi container form

查看:87
本文介绍了MDI容器形式的背景图片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我正在尝试为 mdicontainer 表单设置背景图片.它工作正常,但是当我将 FORM的LAYOUT 属性设置为RIGHT-to-LEFT时,它不会显示.
预先谢谢您.

Hi all,
I''m trying to set a background image for a mdicontainer form. It works fine but when I set the FORM''s LAYOUT property to RIGHT-to-LEFT, it doesn''t show.
Thank you in advance.

推荐答案

在本机代码中,此已知问题是可以解决的,但不是很简单的方法.在纯.NET代码中,您无权访问此窗口,该窗口甚至都不是窗体,这是一个称为"MDI客户端"的特殊窗口.分辨率需要原始Windows API.一定要避免.

您的问题还只是另一个令人信服的反对使用MDI的证据.

帮自己一个忙:完全不使用MDI .没有设计,您可以更轻松地实现设计,并且质量更高.即使Microsoft也强烈建议不要使用MDI,实际上,Microsoft已将其从WPF中删除,并且几乎不支持它.更重要的是,如果您使用MDI,则会吓跑所有用户.只是不要.我可以解释该怎么办.

请参阅:

http://en.wikipedia.org/wiki/Multiple_document_interface#Disadvantages [如何在WPF中创建MDI父窗口? [ ^ ].

另请参阅我过去的答案,在这里我解释了为什么您不想要MDI以及该怎么做:

在WPF中使用MDI窗口的问题 [ ^ ],
MDIContainer提供错误 [如何最大程度地设置子表单,最小化最后一个子表单 [ ^ ].

—SA
In native code this known problem is quite resolvable, but not in a very easy way. In pure .NET code you don''t have access to this windows, which is not even a form, this a special windows called "MDI client". The resolution need raw Windows API. Avoid it by all means.

Your problem is just yet another convincing evidence against using MDI.

Do yourself a great favor: do not use MDI at all. 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. I can explain what to do instead.

Please see:

http://en.wikipedia.org/wiki/Multiple_document_interface#Disadvantages[^],
How to Create MDI Parent Window in WPF?[^].

Please also see my past answers where I explain why you don''t want MDI and what to do instead:

Question on using MDI windows in WPF[^],
MDIContainer giving error[^],
How to set child forms maximized, last childform minimized[^].

—SA


这篇关于MDI容器形式的背景图片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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