社区
C#
帖子详情
@@@@@@在半透明的form上如何让button等控件不透明!!!
cyfboy
2006-07-27 03:39:53
用 this.Opacity = 0.4; 让form 半透明
可是上面的控件 button picturebox 也都半透明了
如何让这些控件不透明?
...全文
296
13
打赏
收藏
@@@@@@在半透明的form上如何让button等控件不透明!!!
用 this.Opacity = 0.4; 让form 半透明 可是上面的控件 button picturebox 也都半透明了 如何让这些控件不透明?
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
13 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
cyfboy
2006-08-03
打赏
举报
回复
To oolongTea(乌龙茶)
你给的是镂空效果,我的意思是要求在一个“半透明”的容器中,显示button控件(不透明),该如何办呢?
tonysunny
2006-08-03
打赏
举报
回复
楼上的方法很特别,呵呵
oolongTea
2006-08-03
打赏
举报
回复
这种效果如何:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
namespace WindowsApplication10
{
/// <summary>
/// Form1 的摘要说明。
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Panel panel1;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
public Form1()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
}
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.button1 = new System.Windows.Forms.Button();
this.panel1 = new System.Windows.Forms.Panel();
this.panel1.SuspendLayout();
this.SuspendLayout();
//
// button1
//
this.button1.BackColor = System.Drawing.SystemColors.Control;
this.button1.Location = new System.Drawing.Point(72, 80);
this.button1.Name = "button1";
this.button1.TabIndex = 0;
this.button1.Text = "button1";
//
// panel1
//
this.panel1.BackColor = System.Drawing.Color.White;
this.panel1.Controls.Add(this.button1);
this.panel1.Location = new System.Drawing.Point(32, 48);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(232, 176);
this.panel1.TabIndex = 1;
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.BackColor = System.Drawing.SystemColors.Control;
this.ClientSize = new System.Drawing.Size(292, 273);
this.Controls.Add(this.panel1);
this.Name = "Form1";
this.Text = "Form1";
this.TransparencyKey = System.Drawing.Color.White;
this.panel1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
}
}
xlshen_lxz
2006-08-02
打赏
举报
回复
写个CSS,在控件上调用这个CSS
Mittermeyer
2006-08-02
打赏
举报
回复
this.Opacity是通过Windows的Layed Window的风格实现半透明的,恐怕没办法让这个容器中的某个控件不透明。
非要实现这样的效果的话,只有写一个Form模拟Button的操作了。
frankccm
2006-08-01
打赏
举报
回复
mark
cyfboy
2006-08-01
打赏
举报
回复
顶
Knight94
2006-07-28
打赏
举报
回复
to 用 this.Opacity = 0.4; 让form 半透明
替换这个半透明方法。
yuzhlhua
2006-07-28
打赏
举报
回复
真的没想到解决的办法~ mark
penda80
2006-07-28
打赏
举报
回复
mark
jacobwc
2006-07-28
打赏
举报
回复
mark mark
guojh021
2006-07-28
打赏
举报
回复
MARK 一下
tonysunny
2006-07-28
打赏
举报
回复
这个问题我也在考虑,MARK
Delphi编程大师2003 1of5
能够让 T
Form
构件产生
半
透明
效果的非可视构件 GraphicEx87 最棒的Internet编程构件 Microsoft Office 97样式TComboBox 构件 JBS 系列的构件套件 ARC系列套件1.0.3 版 TBurner TDosMove Shell Control Pack VCL v1.5...
Delphi编程大师2003 5of5
能够让 T
Form
构件产生
半
透明
效果的非可视构件 GraphicEx87 最棒的Internet编程构件 Microsoft Office 97样式TComboBox 构件 JBS 系列的构件套件 ARC系列套件1.0.3 版 TBurner TDosMove Shell Control Pack VCL v1.5...
从新手小白进入Win
Form
编程 (VS2019)
Win
Form
框架可用于设计窗体和可视
控件
,采用面向对象语言C#,可快速创建绚丽漂亮的基于Windows的桌面应用程序, 提供丰富的
控件
与第三方开源组件,依靠.Net平台的成熟生态,让开发者可以高效快速的开发企业级项目!...
Delphi编程大师2003 3of5
能够让 T
Form
构件产生
半
透明
效果的非可视构件 GraphicEx87 最棒的Internet编程构件 Microsoft Office 97样式TComboBox 构件 JBS 系列的构件套件 ARC系列套件1.0.3 版 TBurner TDosMove Shell Control Pack VCL v1.5...
Delphi编程大师2003 2of5
能够让 T
Form
构件产生
半
透明
效果的非可视构件 GraphicEx87 最棒的Internet编程构件 Microsoft Office 97样式TComboBox 构件 JBS 系列的构件套件 ARC系列套件1.0.3 版 TBurner TDosMove Shell Control Pack VCL v1.5...
C#
110,571
社区成员
642,568
社区内容
发帖
与我相关
我的任务
C#
.NET技术 C#
复制链接
扫一扫
分享
社区描述
.NET技术 C#
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
让您成为最强悍的C#开发者
试试用AI创作助手写篇文章吧
+ 用AI写文章