public void AllShow() { this.Show(); if (skin != null) { skin.Show(); } }
//窗体加载时 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); }
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); }
//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); } }