Print Preview ActiveX Active Users: 23 / Visits Today: 164
Highest Active Users: 101
Print Preview ActiveX
Home | Profile | Register | Active Topics | Members | Search | FAQ | RSS
Username:
Password:
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  

emiel
Administrator

Belgium
327 Posts

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

Action:

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

Syntax:

TextHeight ( strText As String ) As Long

Remarks:

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.

Example:

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:

TextWidth

Come and visit :
www.immoassist.com
www.ppreview.net
www.vbdiamond.com
www.d2dsources.com
www.mandix.com

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