C# How to change font of a label

前端 未结 4 1992
死守一世寂寞
死守一世寂寞 2020-12-09 10:33

A form with a label and a button \'Options\'. By clicking the button a new form opens with 2 radio buttons \'Font1\' and \'Font2\', and two buttons \'Apply\' and \'Cancel\'.

4条回答
  •  借酒劲吻你
    2020-12-09 11:03

    You need to create a new Font

    mainForm.lblName.Font = new Font("Arial", mainForm.lblName.Font.Size);
    

提交回复
热议问题