Solved

Finding the size of the font

Posted on 1998-10-21
2
161 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 12

Accepted Solution

by:
mark2150 earned 10 total points
ID: 1440972
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
ID: 1440973
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

688 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