Print Preview ActiveX Active Users: 61 / Visits Today: 61
Highest Active Users: 61
Print Preview ActiveX
Home | Profile | Register | Active Topics | Members | Search | FAQ | RSS
Save Password
Forgot your Password?

 All Forums
 Print Preview
 Help file
 TextHeight - Function
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic: TextWidth - Function Topic Next Topic: Substitution - Function  


327 Posts

Posted - 07/24/2005 :  12:07:05  Show Profile
Function TextHeight


This Function returns the height of a text string using the current font in twips.


TextHeight ( strText As String ) As Long


The value returned is the height in twips of the specified string, depending on the current font (Name, Size) properties.

In general all characters of a font have the same height.


The following code:

lTxtHgt = Preview.TextHeight ("A line")
lTxtUcHgt = Preview.TextHeight ("A")
lTxtLcHgt = Preview.TextHeight ("a")
Preview.AddText = "TextLine height is " & str(lTxtHgt) & " twips"
Preview.AddText = "UpperCase height is " & str(lTxtUcHgt) & " twips"
Preview.AddText = "Lowercase height is " & str(lTxtLcHgt) & " twips"

produces in most cases:

TextLine height is 200 twips
UpperCase height is 200 twips
LowerCase height is 200 twips

See also:


Come and visit :

Go to Bottom of Page
  Previous Topic: TextWidth - Function Topic Next Topic: Substitution - Function  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Print Preview ActiveX © Mandix Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000 Version 3.4.02