N
Norman Diamond
This involves a Windows Form in Visual Studio 2005 SP1 C# and DotNet
Framework 2.
I created some menus in which every menu title and menu entry is in English.
So instead of appending a shortcut letter in parentheses I used the European
style of putting an & in front of a chosen letter in each actual menu title
and menu entry. In Windows XP this works. In the menu bar, and in each
menu when opened, each shortcut letter has an underscore. In Vista this
doesn't work. In both XP and Vista I have not changed the display options
for shortcuts so they are still the defaults (in Vista I cannot even find
that option).
In C#, how can I set shortcuts to display properly in both XP and Vista?
In the main body of the form I put a DataGridView, a ListView, and some
Buttons. I have not changed the font setting so the form and all controls
still have the default. Visual Studio 2005 SP1 shows the font as MS Gothic.
In C++ I used to change this to MS Shell Dlg so that exported versions would
use a font suitable to whatever countries' languages, but C# seems not to
have this, so I have just left the default setting unchanged. Again, in XP
this works. In XP the form and all controls are in MS Gothic, and the
display is consistent (without antialiasing because the minimum for
antialiasing is somewhere around 18 or so). In Vista this gets scrambled.
In Vista the title bar and menu bar are in Meiryo and are antialiased even
at font size 9. But the DataGridView, ListView, and Buttons are all still
in MS Gothic and unaliased. This combination of fonts, aliased and
unaliased, makes my application look ugly.
Of course I'm not alone with this. Forms such as common dialogs (Open File
Dialog Box) and lots of Vista's own forms have visually disturbing font
mixtures like this. Microsoft closed this issue as a Won'tFix. OK, Vista's
ugly, but that's no reason for my app to be ugly.
In C#, how can I set fonts to make them work in both XP and Vista?
Since my app is proprietary to a customer I cannot publish a screenshot of
that, but here is a screenshot of a Microsoft application showing both of
these problems in Vista:
http://www.geocities.jp/hitotsubishi/menus_fonts.png
In the Open File Dialog Box, most of the controls use Meiryo because
Microsoft was more successful than I have been, four controls near the
bottom are still in MS Gothic. The main window is mostly obscured but the
menu bar is visible, and the underscores are missing from shortcut letters.
Microsoft's application, like mine, does not have these problems in XP.
Framework 2.
I created some menus in which every menu title and menu entry is in English.
So instead of appending a shortcut letter in parentheses I used the European
style of putting an & in front of a chosen letter in each actual menu title
and menu entry. In Windows XP this works. In the menu bar, and in each
menu when opened, each shortcut letter has an underscore. In Vista this
doesn't work. In both XP and Vista I have not changed the display options
for shortcuts so they are still the defaults (in Vista I cannot even find
that option).
In C#, how can I set shortcuts to display properly in both XP and Vista?
In the main body of the form I put a DataGridView, a ListView, and some
Buttons. I have not changed the font setting so the form and all controls
still have the default. Visual Studio 2005 SP1 shows the font as MS Gothic.
In C++ I used to change this to MS Shell Dlg so that exported versions would
use a font suitable to whatever countries' languages, but C# seems not to
have this, so I have just left the default setting unchanged. Again, in XP
this works. In XP the form and all controls are in MS Gothic, and the
display is consistent (without antialiasing because the minimum for
antialiasing is somewhere around 18 or so). In Vista this gets scrambled.
In Vista the title bar and menu bar are in Meiryo and are antialiased even
at font size 9. But the DataGridView, ListView, and Buttons are all still
in MS Gothic and unaliased. This combination of fonts, aliased and
unaliased, makes my application look ugly.
Of course I'm not alone with this. Forms such as common dialogs (Open File
Dialog Box) and lots of Vista's own forms have visually disturbing font
mixtures like this. Microsoft closed this issue as a Won'tFix. OK, Vista's
ugly, but that's no reason for my app to be ugly.
In C#, how can I set fonts to make them work in both XP and Vista?
Since my app is proprietary to a customer I cannot publish a screenshot of
that, but here is a screenshot of a Microsoft application showing both of
these problems in Vista:
http://www.geocities.jp/hitotsubishi/menus_fonts.png
In the Open File Dialog Box, most of the controls use Meiryo because
Microsoft was more successful than I have been, four controls near the
bottom are still in MS Gothic. The main window is mostly obscured but the
menu bar is visible, and the underscores are missing from shortcut letters.
Microsoft's application, like mine, does not have these problems in XP.