Drawstring Problems.


Marc Ouellette

Hi All.

In the code below it will output the text string that is using the text from
txtTextToDraw.Text using the font properties of the lblFont. Then problem
is that not matter the font size in the label. It will also DrawString
Bigger. If I change the font type, size of the label the DrawString output
will change but it is always bigger the the font displayed on the label. I
have no idea why this is happening. Any Idea anyone?


Bitmap bm = (Bitmap)Image.FromFile("1.jpg");
Graphics GraphText = Graphics.FromImage(bm);
Brush br=new SolidBrush(picFontColor.BackColor);
GraphText.DrawString(txtTextToDraw.Text, lblFont.Font, br, 0, 0);


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

DrawString and ellipsis problem 1
DrawString Graphics problem 7
weird kerning problem with DrawString 4
DrawString Method 1
DrawString and WhiteSpace 0
DrawString on Bitmap 2
DrawString error? 8
drawstring alike 4