爱问知识人 爱问教育 医院库

c#编程字体改变不了

首页

c#编程字体改变不了

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 WindowsFormsApplication2
{
    public partial class Form1 : Form
    {
        
        public Form1()
        {
            InitializeComponent();
        }

        private void 字体ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            RichTextBox richTextBox1 = new RichTextBox();
            FontDialog fd = new FontDialog();
            fd.Color =richTextBox1.ForeColor;
            fd.AllowScriptChange = true;
            fd.ShowColor = true;
            fd.AllowSimulations = true;
            fd.AllowVectorFonts = true;
            fd.FontMustExist = true;
            fd.MaxSize = 30;
            fd.MinSize = 6;
            fd.ShowApply = true;
            fd.ShowColor = true;
            fd.ShowEffects = true;
            if (fd.ShowDialog() != DialogResult.Cancel)
            {
                richTextBox1.SelectionFont = fd.Font;
                richTextBox1.SelectionColor = fd.Color;
            }

        }

        private void richTextBox1_TextChanged(object sender, EventArgs e)
        {
           
        }
    }
}
字体框内输入字体不根据调整改变。

提交回答

全部答案

相关推荐

正在加载...
最新问答 推荐信息 热门专题 热点推荐
  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 181-200
  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 181-200
  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 181-200
  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 181-200

热点检索

  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 170-189
返回
顶部
帮助 意见
反馈

确定举报此问题

举报原因(必选):