软组织肉瘤的早期症状:c#怎么实现任意形状窗体

来源:百度文库 编辑:杭州交通信息网 时间:2024/05/06 01:09:34

private void Form1_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
{//创建椭圆形窗体
//创建一个路径对象
GraphicsPath MyPath=new GraphicsPath();
//将椭圆添加到路径对象中
MyPath.AddEllipse(20,30,this.Width-30,this.Height-40);
//使用椭圆构造一个区域,并将此区域作为程序窗体区域
this.Region=new Region(MyPath);
}