Solved

How to adjust text padding when using drawstring?

Posted on 2008-10-05
1
621 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

Stressed Out?

Watch some penguins on the livecam!

Question has a verified solution.

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

The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…

691 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