国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > C# > 正文

C#透明窗體實現方法

2020-01-24 01:45:49
字體:
來源:轉載
供稿:網友

本文實例講述了C#透明窗體實現方法。分享給大家供大家參考。具體實現方法如下:

namespace WindowsApplication1{  public partial class Form2 : Form  {    public Form2()    {      InitializeComponent();      this.Opacity = 1;      this.Text = "opacity=1";      this.TopMost = true;    }    private void Form2_Activated(object sender, EventArgs e)    {      this.timer1.Enabled = true;    }    private void Form2_Deactivate(object sender, EventArgs e)    {      this.timer1.Enabled = false;      this.Opacity = 1;      this.Text = "opacity=" + this.Opacity.ToString();    }    private void Form2_Load(object sender, EventArgs e)    {    }    private void timer1_Tick(object sender, EventArgs e)    {      if (this.Opacity > 0)      {        this.Opacity -= 0.1;        this.Text = "opacity=" + this.Opacity.ToString();      }      else if (this.Opacity == 0)      {        this.Close();      }      else this.timer1.Enabled = false;    }  }}

希望本文所述對大家的C#程序設計有所幫助。

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 临沧市| 永兴县| 长阳| 军事| 浪卡子县| 内黄县| 神农架林区| 常山县| 静宁县| 濮阳市| 阿坝县| 石屏县| 根河市| 永胜县| 通化县| 古交市| 乌兰浩特市| 三原县| 富锦市| 揭西县| 子长县| 保靖县| 社旗县| 泊头市| 建瓯市| 平顶山市| 泸溪县| 德兴市| 高雄县| 河曲县| 金华市| 南郑县| 新民市| 繁峙县| 六安市| 乡城县| 黄大仙区| 潢川县| 阳西县| 鄂伦春自治旗| 紫云|