private void FrmMain_Paint(object sender, PaintEventArgs e)
{           
    GraphicsPath oPath = new GraphicsPath();

    int x = 0;
    int y = 0;
    int w = Width;
    int h = Height;
    int a = 8;
    Graphics g = CreateGraphics();
    oPath.AddArc(x, y, a, a, 180, 90); //边框格式
    oPath.AddArc(w - a, y, a, a, 270, 90);
    oPath.AddArc(w - a / 2, h - a / 2, a / 2, a / 2, 0, 90);
    oPath.AddArc(x, h - a, a, a, 90, 90);
    oPath.CloseAllFigures();
    Region = new Region(oPath);
}

相关文章:

  • 2022-12-23
  • 2021-12-19
  • 2021-11-02
  • 2022-12-23
  • 2022-12-23
  • 2021-06-17
  • 2022-12-23
  • 2021-09-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-06-25
  • 2022-12-23
  • 2022-01-16
  • 2021-07-21
相关资源
相似解决方案