Easiest way to change font and font size

后端 未结 6 1643
迷失自我
迷失自我 2020-12-02 17:01

which is the easiest way to change Font size with C#.

with java it can all be done easily by calling Font constructor with necessary arguments.

JLab         


        
6条回答
  •  广开言路
    2020-12-02 17:25

    You can also create a varible and then assign it for a text. It is cool because you can assign it two or more texts.

    To assign a variable do that

    public partial class Sayfa1 : Form
    
       Font Normal = new Font("Segoe UI", 9, FontStyle.Bold);
    
        public Sayfa1()
    

    This varible is not assigned to any text yet.To do it write the name of the text(Look proporties -> (Name)) then write ".Font" then call the name of your font variable.

    lupusToolStripMenuItem.Font = Normal;
    

    Now you have a text assigned to a Normal font. I hope I could be helpful.

提交回复
热议问题