Make shortcut control text as good as in VS form designer

In VS2008, I developed a form for C # dll. The DLL is a plugin for a slightly older application (circa 2005): let it be called "OldApp". In the VS-form constructor, the text in the Label controls in my form is beautifully displayed: smoothed and correctly crossed. But when I open this form in OldApp (where the C # DLL works like a plugin), the text in the Label controls looks ugly. This is legible, but kerning is low: the letters are spaced farther apart and seem like random offsets. All I can do to make text labels from OldApp look as good as in the VS form designer? I doubt the specific font matters, but this is Arial, 7.2 pt (VS2008 by default). I tried playing with two corresponding lines in Program.cs (see below), with no effect.

Application.EnableVisualStyles(); // tried using it and commenting it out
Application.SetCompatibleTextRenderingDefault(true); // tried true and false
+5
source share
2 answers

I found a similar problem on MSDN forums that mentions adding the following line after the EnableVisualStyles () method.

Application.DoEvents()

This seems to be a bug in older versions of .NET ... which version are you using?

0
source

After the investigation, I have some conclusions, so I will simply answer my question:

  • : , OldApp , - , . , UseCompatibleTextRendering ​​VS. , , , OldApp. , Application.SetCompatibleTextRenderingDefault(false) . OldApp .

  • DeviantSeev, . , . 7.2pt 8pt ( 12pt), . ( ). , ( Font ).

  • VS , , , , int(). 7.2pt 7.4pt , 7,5pt .

  • AutoScaleMode. , resizeable, VS . , VS () . , : , , Font units , .. , , .. , , , , .

0

All Articles