You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After migrating WinForm based on. Net framework 4.6.1 to. Net core 3.1, the window is seriously deformed. What did I miss, or did. Net core 3.1 originally? Do we need to readjust according to. Net core 3.1, or do you need to fix it?
The left and right windows in the figure below are quite different, and the code has no change.
@thank you very much to vino Wang and @ russkie. After setting the default font to font = new font (New fontfamily ("Microsoft sans serif"), 8F), the problem has been resolved. This issue is closed.
Activity
RussKie commentedon Dec 15, 2019
@199621616 please write in English if you require assistance.
@Olina-Zhang is this something you can read?
maikebing commentedon Dec 15, 2019
@199621616 add
Application.SetHighDpiMode(HighDpiMode.SystemAware);tostatic void Main(string[] args)
199621616 commentedon Dec 15, 2019
After migrating WinForm based on. Net framework 4.6.1 to. Net core 3.1, the window is seriously deformed. What did I miss, or did. Net core 3.1 originally? Do we need to readjust according to. Net core 3.1, or do you need to fix it?
The left and right windows in the figure below are quite different, and the code has no change.
199621616 commentedon Dec 15, 2019
add Application.SetHighDpiMode(HighDpiMode.SystemAware); to
static void Main(string[] args)
No change.
Vino-Wang commentedon Dec 16, 2019
@199621616 @RussKie, maybe this is caused by issue #1122. And this is a by design issue, the default Font size is changed in Core project,
RussKie commentedon Dec 16, 2019
@199621616, yes this is the most likely reason, depending on values of
AutoScaleDimensionsandAutoScaleModeproperties of the form.Please have a look at the docs that detail breaking and other notable changes:
199621616 commentedon Dec 16, 2019
@thank you very much to vino Wang and @ russkie. After setting the default font to font = new font (New fontfamily ("Microsoft sans serif"), 8F), the problem has been resolved. This issue is closed.