using System;
using System.Windows.Forms;

namespace _ex_11_19
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            fontDialog1.FontMustExist = true;
            fontDialog1.ShowColor = true;
            fontDialog1.ShowApply = true;
            fontDialog1.MinSize = 12;
            fontDialog1.MaxSize = 72;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (fontDialog1.ShowDialog() == DialogResult.OK)
            {
                richTextBox1.Font = fontDialog1.Font;
                richTextBox1.ForeColor = fontDialog1.Color;
            }
        }
    }
}