Autoscale doesn't work under specific conditions

60 Views Asked by At

I have a form that doesn't seem to respect Autoscale when the user has set something other than 100% in their display settings.

Anyone have any idea what's happening here?

Here are the specific conditions that I've narrowed it down to:

  • WinForms project
  • Put an image on a button (not shown in images below due to scaling of image on button)
  • Add a WPF User Control to the project (no need to reference it from the WinForm)

Notes

  • Removal of either the WPF User Control or the image on the button (the resource can stay) results in the expected scaling
  • In the bad scaling example note that there is no window icon or window text...Maybe a clue?
  • It's hard to tell, but it looks like it flashes on screen at the correct scaling then is redrawn at the wrong scaling.

Images

Bad Result (no scaling):

Unscaled

Expected Result (expected scaling):

enter image description here

Project:

enter image description here

0

There are 0 best solutions below