Solved

Finding the size of the font

Posted on 1998-10-21
2
156 Views
Last Modified: 2013-12-03
Is there any way that I can find the size of font in twips or pixels. Like if I have a font courrier new and size 11 then how can I find how many twips or pixels will it take for the system on which it is running. I am using VB 5.0
0
Comment
Question by:lesa
2 Comments
 
LVL 12

Accepted Solution

by:
mark2150 earned 10 total points
Comment Utility
w = TextWidth( YourString$ )
h = TextHeight( YourString$ )

This will give you size in twips of contents of YourString$

M

0
 
LVL 4

Expert Comment

by:mcix
Comment Utility
You might try out the TextWidth Method:

Something like this:

MsgBox Me.TextWidth("THIS IS A TEST")

I believe it returns in Twips by default.

0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now