From: Herfried K. Wagner [MVP] on
Am 28.04.2010 14:50, schrieb yxq:
> Thank you, i think you are right.
> "You can solve this problem by redrawing the background prior to drawing the
> string.", i do not understand your meaning, could you please tell the
> details?

For example, fill the rectangle the text occupies with the background color.

Relevant methods:

'Graphics.MeasureString'
'Graphics.FillRectangle'
'Graphics.DrawString'

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
From: yxq on
OK, i will try it, thank you.

"Herfried K. Wagner [MVP]" <hirf-spam-me-here(a)gmx.at>
??????:esJk%23ov5KHA.5476(a)TK2MSFTNGP06.phx.gbl...
> Am 28.04.2010 14:50, schrieb yxq:
>> Thank you, i think you are right.
>> "You can solve this problem by redrawing the background prior to drawing
>> the
>> string.", i do not understand your meaning, could you please tell the
>> details?
>
> For example, fill the rectangle the text occupies with the background
> color.
>
> Relevant methods:
>
> 'Graphics.MeasureString'
> 'Graphics.FillRectangle'
> 'Graphics.DrawString'
>
> --
> M S Herfried K. Wagner
> M V P <URL:http://dotnet.mvps.org/>
> V B <URL:http://dotnet.mvps.org/dotnet/faqs/>


From: yxq on
I have solved the problem by add the line below
'Graphics.TextRenderingHint =
System.Drawing.Text.TextRenderingHint.SingleBitPerPixelGridFit
Thank Herfried K. Wagner

> OK, i will try it, thank you.
>
> "Herfried K. Wagner [MVP]" <hirf-spam-me-here(a)gmx.at>
> ??????:esJk%23ov5KHA.5476(a)TK2MSFTNGP06.phx.gbl...
>> Am 28.04.2010 14:50, schrieb yxq:
>>> Thank you, i think you are right.
>>> "You can solve this problem by redrawing the background prior to drawing
>>> the
>>> string.", i do not understand your meaning, could you please tell the
>>> details?
>>
>> For example, fill the rectangle the text occupies with the background
>> color.
>>
>> Relevant methods:
>>
>> 'Graphics.MeasureString'
>> 'Graphics.FillRectangle'
>> 'Graphics.DrawString'
>>
>> --
>> M S Herfried K. Wagner
>> M V P <URL:http://dotnet.mvps.org/>
>> V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
>
>