zl程序教程

您现在的位置是:首页 >  工具

当前栏目

使用FontDialog组件设置字体

组件 设置 字体 使用
2023-09-14 09:00:20 时间

实现效果:

  

知识运用:

  FontDialog组件的Font属性    //获取或设置选定的字体

  public Font Font  { get;set; }

实现代码:

        private void button1_Click(object sender, EventArgs e)
        {
            fontDialog1.ShowDialog();
                textBox1.Font=fontDialog1.Font;
        }