MDI表单中的透明子表单. [英] Transparent child forms within an MDI form.

查看:116
本文介绍了MDI表单中的透明子表单.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我正在开发一个使用MDI和子窗体的Windows Forms应用程序. MDI具有背景图像.我试图使子窗体背景透明,以便MDI图像显示通过.我已经拖网了,但据我了解,这是不可能的.但是,使用API​​在非托管代码中似乎可行.是否有任何示例说明如何执行此操作以及应使用哪种API(最好在C#中使用)?

提前非常感谢.

Andy:confused:

Hi, I''m developing a Windows Forms application that uses an MDI and child forms. The MDI has an image for the background. I am trying to make the child form background be transparent so the MDI image shows through. I have trawled the internet, and from my understanding this is not possible. However, it seems to be possible in unmanaged code using APIs. Are there any examples of how to do this and what API I should use (preferably in C#)?

Many thanks in advance.

Andy:confused:

推荐答案

如果您不能使用分配的背景画笔的不透明度来设置不透明度,那么我不确定您如何可以做到这一点,或者用C ++ API做到这一点.您是否考虑过使用WPF?
If you can''t set the opacity using the opacity of the background brush you assign, then I''m not sure how you''d do this, or what C++ APIs would do it. Have you considered using WPF ?


您好,在表单背景上不允许使用ARGB组件设置不透明度,请尝试这样做!
另外,我也不想使用WPF,因为该应用需要与SP2以下的Win 2000和Win XP向后兼容.

仍然感谢您的评论.

安迪(MCTS)
Hi, setting the opacity using ARGB components, is not allowed on a form background, tried that!

Also, I didn''t want to use WPF as the App needs to be backward compatible with Win 2000 and Win XP below SP2.

Thanks for your comments anyway.

Andy (MCTS)


这篇关于MDI表单中的透明子表单.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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