ex.hlp (Topic list)
TEXTHEIGHT, TEXTWIDTH Methods Example
                        Example                Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
' This example uses the TEXTHEIGHT and TEXTWIDTH methods to determine the
' display height and width of a string expression.
 
' To try this example:
' 1. Choose New Project from the File menu
' 2. Choose New Form from the File menu to create a form with a picture
'    box control
' 3. Press Alt+F4 to return to the programming environment
' 4. Copy the code example below to the form module
' 5. Press F5 to run the example
 
 SUB Form_Click ()
   MsgA$ = "A mistake is evidence that"
   MsgB$ = CHR$(13) + CHR$(10) + " someone has tried to do something."
   Msg$ = MsgA$ + MsgB$
   Picture1.PRINT Msg$
   PRINT "The TEXTHEIGHT of the picture box string is: "; _
   Picture1.TEXTHEIGHT(Msg$)
   PRINT "The TEXTWIDTH of the picture box string is: "; _
   Picture1.TEXTWIDTH(Msg$)
 END SUB