We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,355 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

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

Hello!

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

2
Contributors
3
Replies
2 Days
Discussion Span
2 Years Ago
Last Updated
5
Views
leahrose87
Light Poster
44 posts since Jul 2010
Reputation Points: 10
Solved Threads: 6
Skill Endorsements: 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

G_Waddell
Practically a Master Poster
619 posts since Nov 2009
Reputation Points: 107
Solved Threads: 93
Skill Endorsements: 5

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?

leahrose87
Light Poster
44 posts since Jul 2010
Reputation Points: 10
Solved Threads: 6
Skill Endorsements: 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.

G_Waddell
Practically a Master Poster
619 posts since Nov 2009
Reputation Points: 107
Solved Threads: 93
Skill Endorsements: 5

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.0759 seconds using 2.67MB