如何仅对表单应用不透明度 [英] how to apply opacity to forms only

查看:65
本文介绍了如何仅对表单应用不透明度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

晚上好,先生,我正在研究csharp窗体。我的表格有一个图片框,当我将表格的不透明度设置为50%时,我的图片框也看起来很透明。如何使picturebox得到100%不透明

Good evening sir, iam working on csharp windows forms. my form have one picturebox and when i'm setting opacity of form to 50% then my picturebox also looking transparent. How to made picturebox got 100% opaque

推荐答案

只有将背景颜色设置为像Fuchsia,然后还可以设置表单,可以将透明度应用于表单表面transparencykey为相同的颜色。



确保您想要保持可见的任何控件也不是这种颜色,如果您不希望能够看到窗体边框或标题栏,那么将borderstyle设置为None。
You can apply transparency to the forms surface only by setting the background colour to something like Fuchsia, and then also set the forms transparencykey to the same colour.

Make sure any controls you want to remain visible are also not this colour, and if you don't want to be able to see the forms border or titlebar, then set the borderstyle to None.


这篇关于如何仅对表单应用不透明度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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