Solved

Make a label bold in VB.NET

Posted on 2003-11-07
6
1,190 Views
Last Modified: 2008-02-01
How do I programatically change a windows form Label control to display in bold-faced?

Thanks!
0
Comment
Question by:CraigWettstein
  • 3
  • 2
6 Comments
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 9701452
Label1.Font.Bold=True

AW
0
 

Author Comment

by:CraigWettstein
ID: 9701477
Thanks, Arthur -

I tried that, and when I did, the IDE put the blue squiggly line under my whole line of code.  When I hover my mouse over the line of code, a tip pops up that says: "Property 'Bold' is 'ReadOnly'."
0
 

Accepted Solution

by:
dibblm earned 90 total points
ID: 9701614
me.label1.Font = New Font("MS San Serif,Font.Bold)
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:CraigWettstein
ID: 9701737
Thanks, dibblm -

That gave me an error also, but it pointed me in the right direction.  The correct format of the code is "me.label1.Font = New Font("Microsoft Sans Serif", 8, FontStyle.Bold)".
0
 

Expert Comment

by:dibblm
ID: 9702710
Thank you and you are correct about the formatting. I just pulled it out of my hat without trying it first with the help of intellisense.

 If you are accustom to working with modal forms or forms that open as a dialog. I could use some help myself.

if you have 2 forms (1) and (2)
form (1) opens dialog which opens form(2) dialog

How can I issue a close to close both of them.. me.close of course doesnt close them.
me.close will close the top form or dialog however still leaving the 1st dialog still open to be closed.
0
 

Author Comment

by:CraigWettstein
ID: 9734287
No, sorry, I have worked with dialog forms very little.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

It seems a simple enough task, yet I see repeated questions asking how to do it: how to pass data between two forms. In this article, I will show you the different mechanisms available for you to do just that. This article is directed towards the .N…
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now