如何一次性设置程序的所有的窗体上面的字体呢?

解决方案 »

  1.   


     FontDialog fd = new FontDialog();
                DialogResult dr = fd.ShowDialog();
                if (dr == DialogResult.OK)
                {
                    this.Font = fd.Font;
                    this.toolStrip1.Font = fd.Font;
                    this.toolStrip2.Font = fd.Font;
                }
      

  2.   

    看了,如果是webform的话,可以写到css里面,在页面代码中调用样式就可以了。
      

  3.   

    void ChangFontSize(Form f,int size)
    {
    f.Font = new System.Drawing.Font("宋体", size);
    foreach (Control c in f.Controls)
    {
        c.Font = new System.Drawing.Font("宋体", size);
    }
    }