Solved

How to adjust text padding when using drawstring?

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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
In C#, how would you convert a byte array to its integer value equivalent? 12 38
Tool Box 2 35
Syntax Error 2 47
C#.NET and microsoft certification. 3 34
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

895 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

18 Experts available now in Live!

Get 1:1 Help Now