Solved

string length in pixels when drawing??

Posted on 2004-10-08
3
219 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
This video discusses moving either the default database or any database to a new volume.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

708 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

15 Experts available now in Live!

Get 1:1 Help Now