设置面板背景transperent [英] set panel background transperent

查看:172
本文介绍了设置面板背景transperent的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿伙计们,

我有一个背景图像设置为某个图像的mdi表格。此外,我有一个面板,在该面板中有几个按钮。这个面板在form_Load中设置如下:

 Panel1.Parent =  
SetStyle( ControlStyles.SupportsTransparentBackColor, True
Panel1.BackColor = Color.Transparent



加载后mdi,面板背景是灰色的。

i需要面板背景将是transperent,所以我只能看到按钮。

还有一件事:当我设置mdi时对于isMdiContainer = false,该面板表现得如我所愿。

谢谢,

oron。

解决方案

< blockquote>不幸的是,使用 System.Windows.Forms 所有那些半透明控制的东西都不严重。忘记它并考虑转移到WPF。在WPF中情况正好相反。任何事情都可以是半透明的。

并且不要使用MDI。这是一个单独的故事。只是不要。



-SA


hey guys,
i have an mdi form with background image set to some image. also, i have a panel and in that panel a few buttons. the panel set like this in the form_Load:

Panel1.Parent = Me
        SetStyle(ControlStyles.SupportsTransparentBackColor, True)
        Panel1.BackColor = Color.Transparent


after the load of the mdi, the panel background is gray.
i need the panel background will be transperent, so i can only see the buttons.
one more thing: when i set the mdi to "isMdiContainer = false", the panel behave as i need to.
thanks,
oron.

解决方案

Unfortunately, with System.Windows.Forms all that semi-transparent control stuff is just not serious. Forget it and consider moving to WPF. In WPF the situation is just the opposite. Anything at all can be semi-transparent.
And don't use MDI. This is a separate story. Just don't.

—SA


这篇关于设置面板背景transperent的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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