1、设置窗体属性
this.BackColor
this.TransparencyKey = this.BackColor;
2、窗体加载图片
this.BackgroundImage = global::TransParentForm.Properties.Resources.FormBackGroup;
this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
3、重写窗体鼠标事件
this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.Frm_MouseDown);
this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.Frm_MouseMove);
this.MouseUp += new System.Windows.Forms.MouseEventHandler(this.Frm_MouseUp);
4、添加控件,大功造成!
5、源码下载地址:
https://download.csdn.net/download/xgllrp003/10377949