using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
 
namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            this.Paint += new PaintEventHandler(f1_paint);  
        }
 
        #region Test
        private void f1_paint(object sender, PaintEventArgs e)
        {
            Graphics g = e.Graphics;
            g.DrawString("你好,C#!", new Font("Verdana", 20),
            new SolidBrush(Color.Tomato), 40, 40);
            g.DrawRectangle(new Pen(Color.Pink, 3), 20, 20, 150, 100);
        }  
        #endregion
    }
}

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-02-15
  • 2021-06-13
  • 2021-04-07
  • 2021-08-15
  • 2022-12-23
猜你喜欢
  • 2021-05-20
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-06
  • 2021-07-10
相关资源
相似解决方案