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

namespace WinApp
{
    public partial class HelloControl : Control
    {
        public HelloControl()
        {
            InitializeComponent();
            SetStyle(ControlStyles.ResizeRedraw, true);
        }

        protected override void OnPaint(PaintEventArgs pe)
        {
            using (Brush brush = new SolidBrush(Color.Black))
            using (Font font = new Font("Arial", 20))
                pe.Graphics.DrawString("Привет, Мир!", font, brush, new Point(10, 10));
            base.OnPaint(pe);
        }
    }
}
