不规则形状的Windows窗体(C#)

最简单的方法是什么? 托管代码是否可能?

谢谢你的时间。

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 

这允许您基于图像创建表单,并使用透明度索引使其看起来好像表单不是矩形。

@Geoff在winforms中展示了正确的方式。

但是如果您计划使用WPF而不是Winforms,那么WPF(.NET3.0 +)提供了非常灵活的方法来创建anyshape自定义窗口。 查看本文也是http://www.codeproject.com/KB/WPF/wpfpopup.aspx