this.BackgroundImage = //Image this.FormBorderStyle = FormBorderStyle.None; this.Width = this.BackgroundImage.Width; this.Height = this.BackgroundImage.Height; this.TransparencyKey = Color.FromArgb(0,255,0); //Contrast Color
这允许您基于图像创建表单,并使用透明度索引使其看起来好像格式不是矩形。