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 点个星 星吧
|