设置控件的透明度? BackColor = System.Drawing.Color.Transparent 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 默认情况下,控件不支持透明背景色。但是,通过使用构造函数中的 Control.SetStyle 方法,可以让控件拥有不透明、透明或半透明的背景色。SetStyle 方法是 Control 类的用于为控件设置特定的样式首选项的方法,并可用来启用或禁用对透明背景色的支持。使控件拥有透明背景色 在控件的代码编辑器中找到构造函数。 在构造函数中调用窗体的 SetStyle。 ' Visual BasicSetStyle(ControlStyles.SupportsTransparentBackColor, True)// C#SetStyle(ControlStyles.SupportsTransparentBackColor, true);这将使控件能够支持透明背景色。 在步骤 1 中添加的代码行下再添加下面的代码行。这将把控件的 BackColor 设置为 Transparent。 ' Visual BasicMe.BackColor = Color.Transparent// C#this.BackColor = Color.Transparent;注意,还可以通过使用 Color.FromArgb 方法创建半透明颜色。 as follows:http://expert.csdn.net/Expert/topic/1892/1892545.xml?temp=.6070825 this.BackColor = Color.Transparent;是全透明呀!非常感谢各位兄弟的支持 跪求!关于对路径的问题,搞了三天了还是不行,求求大家了呀!! 装好了VS Team System2k8 , Microsoft.Net目录下找不到Framework目录。 小弟要设计一个工资打印系统,界面如图,求设计方法. C# 能不能实现变量重载呀..就是用变量来声明变量的名字.... 程序自动注册测试 請幫忙看一下加解密的問題. 批处理文件问题 C#编写委托和事件 还是datagrid 如何输入一个数字? 数据库连接问题,在线等待(一定给分) 窗体的问题
在构造函数中调用窗体的 SetStyle。
' Visual Basic
SetStyle(ControlStyles.SupportsTransparentBackColor, True)// C#
SetStyle(ControlStyles.SupportsTransparentBackColor, true);
这将使控件能够支持透明背景色。 在步骤 1 中添加的代码行下再添加下面的代码行。这将把控件的 BackColor 设置为 Transparent。
' Visual Basic
Me.BackColor = Color.Transparent// C#
this.BackColor = Color.Transparent;
注意,还可以通过使用 Color.FromArgb 方法创建半透明颜色。
as follows:http://expert.csdn.net/Expert/topic/1892/1892545.xml?temp=.6070825
是全透明呀!
非常感谢各位兄弟的支持