메뉴 건너뛰기

Programing

C# 게시판

폰트바꾸기

관리자 2018.12.30 15:40 조회 수 : 262

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

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

        private void tsbtnFont_Click(object sender, EventArgs e)
        {
            if (this.FontDig.ShowDialog() == DialogResult.OK)
            {
                this.txtMemo.Font = this.FontDig.Font;
            }
        }

        private void tsbtnColor_Click(object sender, EventArgs e)
        {
            if (this.colorDig.ShowDialog() == DialogResult.OK)
            {
                this.txtMemo.ForeColor = this.colorDig.Color;
            }
        }
    }
}
첫번째 버튼이 글자크기 및 글꼴,두번째 버튼이 색깔이다.

위로