Click here to Skip to main content
16,016,894 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Even though I mention Font ("Arial", 9, FontStyle.Regular) in DrawString method, font is coming as bold in Windows 7. But in Windows XP it is coming alright.

VB
Dim printFont1 As New Font("Arial", 9, FontStyle.Regular)
Dim myBrush As New SolidBrush(Color.Black)
Dim bm1 As New Bitmap(PictureBox5.Width, PictureBox5.Height, PixelFormat.Format32bppPArgb)
Dim gr1 As Graphics = Graphics.FromImage(bm1)
  
gr1.DrawString("Hello:", printFont1, myBrush, x, y)


Any help will be highly appreciated
Posted
Updated 2-Apr-12 0:45am
v2

1 solution

Graphics.TextRenderingHint = System.Drawing.Text.TextRenderingHint.SingleBitPerPixelGridFit;

I think this will solve your problem :)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900