设为首页 加入收藏

TOP

(二十二)c#Winform自定义控件-半透明窗体(二)
2019-09-17 15:43:18 】 浏览:31
Tags:二十二 c#Winform 定义 控件 透明 窗体
ed; otherwise, false.
</param> 14 protected override void Dispose(bool disposing) 15 { 16 if (disposing && (components != null)) 17 { 18 components.Dispose(); 19 } 20 base.Dispose(disposing); 21 } 22 23 #region Windows Form Designer generated code 24 25 /// <summary> 26 /// Required method for Designer support - do not modify 27 /// the contents of this method with the code editor. 28 /// </summary> 29 private void InitializeComponent() 30 { 31 System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmTransparent)); 32 this.SuspendLayout(); 33 // 34 // FrmTransparent 35 // 36 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; 37 this.BackColor = System.Drawing.Color.Black; 38 this.ClientSize = new System.Drawing.Size(284, 262); 39 this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 40 this.Name = "FrmTransparent"; 41 this.Opacity = 0.5D; 42 this.ShowIcon = false; 43 this.ShowInTaskbar = false; 44 this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; 45 this.Text = "FrmTransparent"; 46 this.Load += new System.EventHandler(this.FrmTransparent_Load); 47 this.ResumeLayout(false); 48 49 } 50 51 #endregion 52 } 53 } View Code

主要就是构造函数和load事件里面的那几句话

用处及效果

用途:一般用在蒙版,比如弹出窗口的时候,显示一个半透明蒙版

最后的话

如果你喜欢的话,请到 https://gitee.com/kwwwvagaa/net_winform_custom_control 点个星 星吧

首页 上一页 1 2 下一页 尾页 2/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇MVC三层架构搭建 下一篇(十六)c#Winform自定义控件-文..

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目