我把我的方法给你看一下
public Form1()
{
InitializeComponent();
this.StartPosition = FormStartPosition.CenterScreen;
this.FormBorderStyle = FormBorderStyle.None;
this.ControlBox = false;
Point[] polyPoints ={
new Point (panel1.Location.X,panel1.Location.Y ),
new Point (panel1.Location.X + panel1.Width,panel1.Location.Y),
new Point (panel1.Location.X +panel1.Width ,panel1.Location.Y +panel1.Height),
new Point (panel1.Location.X,panel1.Location.Y +panel1.Height)
};
GraphicsPath path = new GraphicsPath();
path.AddPolygon(polyPoints);
Region region = new Region(path);
this.Region = region;
}
不知道能不能帮上忙
试试把,代码写完就要多试试