title: How to handle menu scaling after runtime DPI change in Delphi Seattle
body: <p>When support for runtime DPI switching was added to the forms class, no consideration was given to basic UI elements like menus.</p>
  
  <p>Menu drawing is fundamentally broken because it relies on Screen.MenuFont, which is a <strong>system wide metric</strong>, not specific to monitors.  So while the form itself can be properly scaled relatively simply, the menus that display over it only work correctly IF that scaling happens to match whatever metrics were loaded into the Screen object.</p>
  
  <p>This is a problem for the main menu bar, its popup menus, and all popup menus on the form.  None of these scale if the form is moved to a monitor with a different DPI than the system metrics.</p>
  
  <p>The only way to really make this work is to fix the VCL.  Waiting for Embarcadero to flesh out multi-DPI is not really an option.</p>
  
  <p>Looking at the VCL code, the basic issue is that the Screen.MenuFont property is assigned to a menu canvas rather than selecting a font appropriate for the monitor on which the menu will appear.  Affected classes can be found simply by searching for Screen.MenuFont in the VCL source.</p>
  
  <p>What is the correct way to work around this limitation, without having to completely re-write the classes involved?</p>
  
  <p>My first inclination is to use a detour to keep track of menu popups and override the Screen.MenuFont property when it is being used to set up a menu.  That seems like too much of a hack.</p>