Example #1
0
 //带参构造
 public SkinForm(FormExhyh main)
 {
     //将控制层传值过来
     this.Main = main;
     InitializeComponent();
     //置顶窗体
     TopMost = Main.TopMost;
     Main.BringToFront();
     //是否在任务栏显示
     ShowInTaskbar = false;
     //无边框模式
     FormBorderStyle = FormBorderStyle.None;
     //设置绘图层显示位置
     this.Location = new Point(Main.Location.X - 5, Main.Location.Y - 5);
     //设置ICO
     Icon     = Main.Icon;
     ShowIcon = Main.ShowIcon;
     //设置大小
     Width  = Main.Width + 10;
     Height = Main.Height + 10;
     //设置标题名
     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();
 }
Example #2
0
 //带参构造
 public SkinForm(FormExhyh main)
 {
     //将控制层传值过来
     this.Main = main;
     InitializeComponent();
     //置顶窗体
     TopMost = Main.TopMost;
     Main.BringToFront();
     //是否在任务栏显示
     ShowInTaskbar = false;
     //无边框模式
     FormBorderStyle = FormBorderStyle.None;
     //设置绘图层显示位置
     this.Location = new Point(Main.Location.X - 5, Main.Location.Y - 5);
     //设置ICO
     Icon = Main.Icon;
     ShowIcon = Main.ShowIcon;
     //设置大小
     Width = Main.Width + 10;
     Height = Main.Height + 10;
     //设置标题名
     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();
 }