欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

C#圓角窗體簡(jiǎn)單實(shí)現(xiàn)方法

 更新時(shí)間:2015年09月11日 18:27:08   作者:我心依舊  
這篇文章主要介紹了C#圓角窗體簡(jiǎn)單實(shí)現(xiàn)方法,涉及C#窗體設(shè)置的相關(guān)技巧,具有一定參考借鑒價(jià)值,需要的朋友可以參考下

本文實(shí)例講述了C#圓角窗體簡(jiǎn)單實(shí)現(xiàn)方法。分享給大家供大家參考。具體如下:

public partial class Form1 : Form
{
  public Form1()
  {
   InitializeComponent();
  }
  private void Form1_Resize(object sender, EventArgs e)
  {
   Type(this, 25, 0.1);
  }
  private void Type(Control sender, int p_1, double p_2)
  {
   GraphicsPath oPath = new GraphicsPath();
   oPath.AddClosedCurve(new Point[] { new Point(0, sender.Height / p_1), new Point(sender.Width / p_1, 0), new Point(sender.Width - sender.Width / p_1, 0), new Point(sender.Width, sender.Height / p_1), new Point(sender.Width, sender.Height - sender.Height / p_1), new Point(sender.Width - sender.Width / p_1, sender.Height), new Point(sender.Width / p_1, sender.Height), new Point(0, sender.Height - sender.Height / p_1) }, (float)p_2);
   sender.Region = new Region(oPath);
  }
  private void Form1_Paint(object sender, PaintEventArgs e)
  {
   Type(this, 25, 0.1);
  }
}

希望本文所述對(duì)大家的C#程序設(shè)計(jì)有所幫助。

相關(guān)文章

最新評(píng)論