Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to adjust text padding when using drawstring?

Posted on 2008-10-05
1
Medium Priority
?
641 Views
Last Modified: 2013-11-26
The app that I am writing is to act as an editor for software screens that are a part of the software that belongs to my company.  Where there screen is designed by strictly typing in variables into a text file, I am trying to create a drawing program that will allow me to simply draw the objects just as you might do with a paint program.

So to start, I load my screen based on the very same file that was first created by hand typing the values.  So far everything is working perfectly.  All the elements are of the exact same size, shape and color of the elements as they appear in my companies software.  With just one exception...........

I am using drawstring to paint some text on the screen by taking the top, left, width, text and font values from the text file.  I draw the text and draw a rectangle around the text (same rec as for drawstring) and while the rectangle appears to be the exact same shape and size between the two screens as do the size of the font, it appears as if drawstring has some sort of padding around the text.

The result is the text doesn't fit in the text box correctly.

Anyone have any ideas on how to adjust this in VB.net?

This padding is the only thing keeping me from sending this app to the beta testers!

Thanks in advance.
0
Comment
Question by:atlind
[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
1 Comment
 

Accepted Solution

by:
atlind earned 0 total points
ID: 22646775
Found the solution for me.  Thanks anyway tho.

Since line warping is not supported by my companies app anyway, turning this off on my app makes the text display correctly.
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

A basic question.. “What is the Garbage Collector?” The usual answer given back: “Garbage collector is a background thread run by the CLR for freeing up the memory space used by the objects which are no longer used by the program.” I wondered …
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

636 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