Solved

string length in pixels when drawing??

Posted on 2004-10-08
3
220 Views
Last Modified: 2008-02-01
i want to be able to know how many pixels are within a specific font and size, im printing. my printing page will be separated into columns and i want to know when a specific string length has meet the pixel size length for the column(i have called this variable xincrease. does any one know how to work this out?



        Dim pageboundleft As Integer
        Dim pageboundright As Integer
        Dim pageboundtop As Integer
        Dim pageboundbottom As Integer

        pageboundleft = e.MarginBounds.Left
        pageboundright = e.MarginBounds.Right
        pageboundtop = e.MarginBounds.Top
        pageboundbottom = e.MarginBounds.Bottom

'gets column width in pixels?
        Dim xincrease As Integer = (pageboundright - pageboundleft) / (gridcolmax + 1)




   
0
Comment
Question by:evo14sale
3 Comments
 
LVL 8

Accepted Solution

by:
wguerram earned 230 total points
ID: 12265971
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

919 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

22 Experts available now in Live!

Get 1:1 Help Now