示例#1
0
 //Show或Hide被调用时
 protected override void OnVisibleChanged(EventArgs e)
 {
     if (Visible)
     {
         //启用窗口淡入淡出
         if (!DesignMode)
         {
             //淡入特效
             Win32.AnimateWindow(this.Handle, 150, Win32.AW_BLEND | Win32.AW_ACTIVATE);
         }
         //判断不是在设计器中
         if (!DesignMode && skin == null)
         {
             skin = new SkinForm(this);
             skin.Show(this);
         }
         base.OnVisibleChanged(e);
     }
     else
     {
         base.OnVisibleChanged(e);
         Win32.AnimateWindow(this.Handle, 150, Win32.AW_BLEND | Win32.AW_HIDE);
     }
 }
示例#2
0
 protected override void OnVisibleChanged(EventArgs e)
 {
     if (!DesignMode)
     {
         if (skin != null)
         {
             skin.Visible = this.Visible;
         }
         else
         {
             SkinTools.CreateControlRegion(this, TrankBack(), 255);
             show = true;
             skin = new SkinForm(this);
             skin.Show();
         }
     }
     base.OnVisibleChanged(e);
 }
 protected override void OnVisibleChanged(EventArgs e)
 {
     if (!base.DesignMode)
     {
         if (this.skin != null)
         {
             this.skin.Visible = base.Visible;
         }
         else
         {
             UpdateForm.CreateControlRegion(this, this.TrankBack(), 0xff);
             this.show = true;
             this.skin = new SkinForm(this);
             this.skin.Show();
         }
     }
     base.OnVisibleChanged(e);
 }
示例#4
0
 //窗体加载时
 protected override void OnLoad(EventArgs e)
 {
     if (!DesignMode)
     {
         skin = new SkinForm(this);
         skin.Show();
         //淡入特效
         //Win32.AnimateWindow(this.Handle, GradientTime, Win32.AW_BLEND | Win32.AW_ACTIVATE);
     }
     base.OnLoad(e);
 }