Is it possible e.g for label to set font style italic-underline?
regard j
Printable View
Is it possible e.g for label to set font style italic-underline?
regard j
VB Code:
ctrl.Font = New Font(ctrl.Font, FontStyle.Italic Or FontStyle.Underline)
Yes. You can do it at design time, or at runtime.Code:lblSample.Font = New Drawing.Font("FontName", FontSizeAsSingle)
http://www.vbforums.com/ Edneeis
Ok, I know how to set font and one font style(regular,bold,italic,underline). But I want to set two font styles, e.g I want to set label text display like this 'label caption', again if it's possible.
regard j
You obviously didn't try the example posted (I don't mean to sound rude). To set more than one style at the sametime you use Or to add them together as shown.Quote:
Originally posted by Edneeis
VB Code:
ctrl.Font = New Font(ctrl.Font, FontStyle.Italic Or FontStyle.Underline)
Sorry Edneeis,
yes you are right, your first post is solution. Once again I apologize for my laziness.
regard j