How do I change the font of a label and make it to be font?
Printable View
How do I change the font of a label and make it to be font?
Hi,Quote:
Originally Posted by JohnRChick
You go into the properties of your label and change the FontStyle.
Ore you can do it with code:
VB Code:
With Label1.Font Label1.Font = New Font(.Name, .Size * 1.5, .Style, .Unit) End With
Hope it helps you,
sparrow1
Note that the Font constructor is overloaded. If you just want to change the style of the font then use the overload that takes an existing Font as a parameter. For instance, if all you want to do is toggle the Bold style you do this:VB Code:
myLabel.Font = New Font(myLabel.Font, myLabel.Font.Style Xor FontStyle.Bold)