subscript letters in VB 6.0

In VB 6.0, is there a way to write the small 2 as in CO<subscript>2 . I have a label "CO2" in my vb program, how can I change this to look like CO with small 2 to the bottom of CO.

Thank you.
AiyshaAsked:
Who is Participating?
 
PaulHewsConnect With a Mentor Commented:
I don't believe it's possible with a standard label.  However, it's possible through printing on the form.  Here's a little workaround:

Private Sub Form_Load()

    Label1.Font = "Arial"  'Make sure it's a true type font!!!
    PrintLabel Label1
   
End Sub

Private Sub PrintLabel(lbl As Label)
    lbl.Caption = ""
    lbl.BackStyle = vbTransparent
    Me.AutoRedraw = True
    Me.FontSize = lbl.FontSize   'You can use any font size...
    Me.Font = lbl.Font   'You can use other fonts
    Me.CurrentX = lbl.Left   'Position where you wish to start (label left, top)
    Me.CurrentY = lbl.Top
    Me.Print "CO";
    Me.CurrentY = Me.CurrentY + Me.TextHeight("CO")
    Me.FontSize = Me.FontSize / 2
    Me.CurrentY = Me.CurrentY - Me.TextHeight("2")
   
    Me.Print "2"
End Sub

0
 
JackOfPHCommented:
The only way to achieve this is to create to label and make the font size of one label smaller to the other.
0
 
Mortaza DoulatyCommented:
Using HTML or RTF text interpreting may help...
0
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

 
JackOfPHCommented:
The only way to achieve this is to create two label and make the font size of one label smaller to the other.
0
 
Mortaza DoulatyCommented:
JackOfPH>> Not the only...
0
 
JackOfPHCommented:
I stand corrected...

thanks,

Jack
0
 
Computer101Commented:
Forced accept.

Computer101
EE Admin
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.