?
Solved

Make a label bold in VB.NET

Posted on 2003-11-07
6
Medium Priority
?
1,199 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 180 total points
ID: 9701614
me.label1.Font = New Font("MS San Serif,Font.Bold)
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

770 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