开发者

How can I use multiple combinations of font styles in VB.NET?

开发者 https://www.devze.com 2022-12-19 12:14 出处:网络
If I want to set my Font I can use new Font=(\"Times New Roman\", 12, Drawing.FontStyle.Bold) Instead of Bold, I can use Italic, Regular or Underline.

If I want to set my Font I can use

new Font=("Times New Roman", 12, Drawing.FontStyle.Bold)

Instead of Bold, I can use Italic, Regular or Underline.

But I want to make use of Bold and Italic at the sa开发者_开发技巧me time.

How can I do this?


The FontStyle enumeration is a flags enumeration, so you can combine values (using the Or operator in VB.NET, | in c#):

new Font("Times New Roman", 12, Drawing.FontStyle.Bold Or Drawing.FontStyle.Italic)
0

精彩评论

暂无评论...
验证码 换一张
取 消