Solved

Finding the size of the font

Posted on 1998-10-21
2
158 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
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

ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

Suggested Solutions

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
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…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

773 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