Form1.cs 全部代码:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace DrawEllipse
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            Graphics dc = CreateGraphics();
            Show();
            Pen redPen = new Pen(Color.Red, 2);
            dc.DrawEllipse(redPen, 0, 50, 80, 60);
        }
    }
}

 

示例下载:https://files.cnblogs.com/andrew-blog/DrawEllipse.rar

参考:http://www.wxzzz.com/?id=108

 

相关文章:

  • 2022-12-23
  • 2023-03-15
  • 2021-09-04
  • 2022-12-23
  • 2021-06-26
  • 2021-11-15
猜你喜欢
  • 2022-12-23
  • 2021-10-30
  • 2022-12-23
  • 2022-12-23
  • 2021-11-10
  • 2022-12-23
  • 2021-08-05
相关资源
相似解决方案