C # modify some of the basics of the style of the font size

txtName is Textbox text box

1 simply modify the fonts txtName.Font = new Font ( "italics", txtName.Font.Size, txtName.Font.Style);

2 simply modify the font style txtName.Font = new Font (txtName.Font, txtName.Font.Style | FontStyle.Bold); (added to the original style) ^ (and that would have been the kind of style becomes no);

3, then the initial font txtName.Font = new Font ( "Arial", 20, FontStyle.Regular);

 

Guess you like

Origin www.cnblogs.com/qq-1585047819/p/11605109.html