Example #1
0
 private void Init()
 {
     //置顶窗体
     TopMost = Main.TopMost;
     Main.BringToFront();
     //是否在任务栏显示
     ShowInTaskbar = false;
     //无边框模式
     FormBorderStyle = FormBorderStyle.None;
     //设置绘图层显示位置
     this.Location = new Point(Main.Location.X - Main.ShadowWidth, Main.Location.Y - Main.ShadowWidth);
     //设置ICO
     Icon     = Main.Icon;
     ShowIcon = Main.ShowIcon;
     //设置大小
     Width  = Main.Width + Main.ShadowWidth * 2;
     Height = Main.Height + Main.ShadowWidth * 2;
     //设置标题名
     Text = Main.Text;
     //绘图层窗体移动
     Main.LocationChanged += new EventHandler(Main_LocationChanged);
     Main.SizeChanged     += new EventHandler(Main_SizeChanged);
     Main.VisibleChanged  += new EventHandler(Main_VisibleChanged);
     //还原任务栏右键菜单
     //CommonClass.SetTaskMenu(Main);
     //加载背景
     SetBits();
     //窗口鼠标穿透效果
     CanPenetrate();
 }