Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
C# Helper...
 
XML RSS Feed
Follow VBHelper on Twitter
 
 
MSDN Visual Basic Community
 
 
 
 
 
TitleDraw a font at different sizes
Keywordsfont, text, size
CategoriesGraphics
 
Display the font using different values of Font.Size.
 
Private Sub Form_Load()
Dim font_size As Single

    AutoRedraw = True
    Font.Name = "Times New Roman"
    For font_size = 9.75 To 30 Step 0.75
        Font.Size = font_size
        Print font_size & " (" & Font.Size & ")"
    Next font_size
End Sub
 
Times New Roman seems to allow sizes starting at 9.75 point and increasing by 0.75. Other fonts allow other sizes. For example, change the font name to MS Sans Serif and the step size to 0.25. This font seems to allow sizes 9.75, 12, 13.5, and 16.5.
 
 
Copyright © 1997-2010 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated