Solved

Make a label bold in VB.NET

Posted on 2003-11-07
6
1,194 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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 

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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

IP addresses can be stored in a database in any of several ways.  These ways may vary based on the volume of the data.  I was dealing with quite a large amount of data for user authentication purpose, and needed a way to minimize the storage.   …
The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

777 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