changing italics of a font

mikerob283

Member
Joined
Feb 15, 2005
Messages
12
Programming Experience
Beginner
lblStatus.Font.Italics = False


error - property 'italics' is 'readonly'

i laugh at myself, i knew it couldn't be that simple.
 
To change the font, use one of the overloaded constructors of the Font class to create a new font. Here's an example:
VB.NET:
lblStatus.Font = New Font(lblStatus.Font, FontStyle.Italic)
'use Or to combine two or more FontStyles:
lblStatus.Font = New Font(lblStatus.Font, FontStyle.Italic Or FontStyle.Bold)
 
Back
Top