?
Solved

how to convert regular font to bold font in vb

Posted on 2003-03-15
4
Medium Priority
?
795 Views
Last Modified: 2013-12-02
i have stored set of stings in one variable
that stings in regular font how to convert bold font
0
Comment
Question by:kathavarayan
[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
4 Comments
 
LVL 1

Accepted Solution

by:
Ysgrathe earned 160 total points
ID: 8142523
kathavarayan,

variables of type string do not hold display information, such as font type, size, or colour.
this formatting is provided by whatever means is used to display the string.

for example if a have a string...

dim strSomeText as string
strSomeText="This is a test string"

and i have a label control on my form called lblText

then if i make lblText's caption property equal to my string it will display the text, thus...

lblText.Caption = strSomeText

if you need to change the formatting access the various properties of the label control, like this...

    With lblText
        .Font = "Verdana"
        .FontBold = True
        .FontItalic = True
        .FontSize = 24
        .ForeColor = vbRed
    End With

there are other ways to display text that do not require controls such as text boxes of labels, but most of the time this is what you will use.
0
 

Expert Comment

by:CleanupPing
ID: 8900045
kathavarayan:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Experts: Post your closing recommendations!  Who deserves points here?
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 9699787
Moderator, my recommended disposition is:

    Accept Ysgrathe's comment(s) as an answer.

DanRollins -- EE database cleanup volunteer
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Suggested Courses
Course of the Month12 days, 17 hours left to enroll

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