1,105,290 Community Members

How to underline a specific text in a label in vb .net?

Member Avatar
leahrose87
Light Poster
44 posts since Jul 2010
Reputation Points: 0 [?]
Q&As Helped to Solve: 6 [?]
Skill Endorsements: 0 [?]
 
0
 

Hello!

I want to underline a word in a sentence in vb .net. Any idea?

Member Avatar
G_Waddell
Practically a Posting Shark
821 posts since Nov 2009
Reputation Points: 131 [?]
Q&As Helped to Solve: 137 [?]
Skill Endorsements: 13 [?]
 
0
 

Hi
Is it a particular word within a sentence? or just a label?

Label1.Font = New Font(Label1.Font, FontStyle.Underline)

You define a new font based on the old one i.e.

New Font(Label1.Font, FontStyle.Underline)

In otherwords the new font is based on the existing value but with underline

Member Avatar
leahrose87
Light Poster
44 posts since Jul 2010
Reputation Points: 0 [?]
Q&As Helped to Solve: 6 [?]
Skill Endorsements: 0 [?]
 
0
 

Actually it is a label but all I need to underline is a particular word within a sentence. But the whole sentence should be visible as well. Can you help me?

Member Avatar
G_Waddell
Practically a Posting Shark
821 posts since Nov 2009
Reputation Points: 131 [?]
Q&As Helped to Solve: 137 [?]
Skill Endorsements: 13 [?]
 
0
 

Hi,

As far as I'm aware, you can not have different formats inside the one label.. looks like you will need to use something else.

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article