zoukankan      html  css  js  c++  java
  • C#圆角窗体简单实现方法

    C#圆角窗体简单实现方法。分享给大家供大家参考。具体如下:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    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);
      }
    }
  • 相关阅读:
    shuffle过程分析
    自定义分组
    自定义排序及Hadoop序列化
    MapReduce常见算法
    Partitioner
    Combiner
    自定义Counter使用
    WordCount_命令行运行时指定参数
    老的API实现WordCount
    Hadoop自定义类型处理手机上网日志
  • 原文地址:https://www.cnblogs.com/wanzhongjun/p/6388503.html
Copyright © 2011-2022 走看看