Solved

string length in pixels when drawing??

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Visual Studio .Net 2012 and Crystal Reports 9 67
cannot connect to sqlserver 8 28
vb.net class 3 14
Help with preventing selection from a combobox 11 24
Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

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