日期:2014-05-18 浏览次数:20918 次
private void button1_Click(object sender, EventArgs e) { panel1.BorderStyle = BorderStyle.None; panel1.BackColor = Color.Blue; GraphicsPath vGraphicsPath = new GraphicsPath(); vGraphicsPath.AddEllipse(new Rectangle(0, 0, panel1.Width, panel1.Height)); vGraphicsPath.AddEllipse(new Rectangle(10, 10, panel1.Width - 20, panel1.Height - 20)); panel1.Region = new Region(vGraphicsPath); }