Article ID: 190223
Article Last Modified on 6/29/2004
Private Sub Form_Click()
Dim MyFont As New StdFont
Dim outstring As String
MyFont.Name = "Arial"
MyFont.Size = 12
MyFont.Bold = False
MyFont.Italic = False
Me.Cls
Set Me.Font = MyFont
outstring = Me.Font.Name & ", " & Me.Font.Size
Me.Print outstring ' This prints in normal size
Set Printer.Font = MyFont
' Since VB caches the font information, we need to refresh it
Me.Font.Italic = True ' Change Italic to True for demonstration
Me.Print outstring ' prints out much larger than the first line
End Sub
Arial, 12
The first line is in a normal 12 point font, but the second line is
obviously much larger, even though it reports still being 12 point. This
is because the Printer object has changed the font's scaling.Additional query words: kbDSupport kbDSD FontSize kbVBp kbVBp400 kbVBp500 kbVBp600 kbVBp kbdsd kbDSupport
Keywords: kbprb KB190223