Hello!

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

Recommended Answers

All 3 Replies

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

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?

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.