Link to home
Start Free TrialLog in
Avatar of CraigWettstein
CraigWettstein

asked on

Make a label bold in VB.NET

How do I programatically change a windows form Label control to display in bold-faced?

Thanks!
Avatar of Arthur_Wood
Arthur_Wood
Flag of United States of America image

Label1.Font.Bold=True

AW
Avatar of CraigWettstein
CraigWettstein

ASKER

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'."
ASKER CERTIFIED SOLUTION
Avatar of dibblm
dibblm

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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)".
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.
No, sorry, I have worked with dialog forms very little.