From: yxq on 27 Apr 2010 06:54 I found a good article about the disk explorer http://www.codeproject.com/KB/vb/Disk_Size_Explorer.aspx And it ran well on Windows XP, but the text font on the chart was ugly when ran on Windows 7, look scratchy. I researched the code about the font for long time, it used DrawString method to draw the text string, but i did not how to correct it, can anyone correct it?
From: PvdG42 on 27 Apr 2010 10:50 "yxq" <gayxq(a)163.net> wrote in message news:uRGrWgf5KHA.5016(a)TK2MSFTNGP02.phx.gbl... > I found a good article about the disk explorer > http://www.codeproject.com/KB/vb/Disk_Size_Explorer.aspx > > And it ran well on Windows XP, but the text font on the chart was ugly > when ran on Windows 7, look scratchy. > I researched the code about the font for long time, it used DrawString > method to draw the text string, but i did not how to correct it, can > anyone correct it? > Every overload of the DrawString method specifies a Font object as the second argument. Research the Font class here: http://msdn.microsoft.com/en-us/library/system.drawing.font.aspx and you should be able to change the font to something that looks better.
From: yxq on 27 Apr 2010 18:10 I have changed the font to the specified Aril, regular, but the shown font like bold and irregular, i think maybe the GDI+ caused the problem or there are some changes from XP to Windows 7. > > "yxq" <gayxq(a)163.net> wrote in message > news:uRGrWgf5KHA.5016(a)TK2MSFTNGP02.phx.gbl... >> I found a good article about the disk explorer >> http://www.codeproject.com/KB/vb/Disk_Size_Explorer.aspx >> >> And it ran well on Windows XP, but the text font on the chart was ugly >> when ran on Windows 7, look scratchy. >> I researched the code about the font for long time, it used DrawString >> method to draw the text string, but i did not how to correct it, can >> anyone correct it? >> > > Every overload of the DrawString method specifies a Font object as the > second argument. Research the Font class here: > > http://msdn.microsoft.com/en-us/library/system.drawing.font.aspx > > and you should be able to change the font to something that looks better. > >
From: Herfried K. Wagner [MVP] on 27 Apr 2010 21:13 Am 28.04.2010 00:10, schrieb yxq: > I have changed the font to the specified Aril, regular, but the shown font > like bold and irregular, i think maybe the GDI+ caused the problem or there > are some changes from XP to Windows 7. Maybe ClearType was turned off on the Windows XP machine and is turned on on the Windows 7 machine. If this is the case, you'd have to adjust the drawing code. When drawing the same string onto a certain surface more than once, the ClearType subpixel colors add up, which leads to a horribly looking result. You can solve this problem by redrawing the background prior to drawing the string. -- 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 28 Apr 2010 08:50 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? > Am 28.04.2010 00:10, schrieb yxq: >> I have changed the font to the specified Aril, regular, but the shown >> font >> like bold and irregular, i think maybe the GDI+ caused the problem or >> there >> are some changes from XP to Windows 7. > > Maybe ClearType was turned off on the Windows XP machine and is turned on > on the Windows 7 machine. If this is the case, you'd have to adjust the > drawing code. When drawing the same string onto a certain surface more > than once, the ClearType subpixel colors add up, which leads to a horribly > looking result. You can solve this problem by redrawing the background > prior to drawing the string. > > -- > M S Herfried K. Wagner > M V P <URL:http://dotnet.mvps.org/> > V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
|
Next
|
Last
Pages: 1 2 Prev: Do not work well for Windows 7? Next: Upload/Download files in Chunks on FTP |