An error occurred in script '/home/yhr1ef23xez5/public_html/web2/app/model/bannerhit.php' on line 17:
Undefined index: HTTP_REFERER

Array
(
    [type] => solution
    [name] => winforms-highdpi
)

WinWrap® | WinForms and High DPI Monitors
logo WinWrap®

WinForms and High DPI Monitors

.NET 4.0 WinForms High DPI

  • Add an app.manifest file
  • Modify the app.config file

.NET 4.0 WinForms and High DPI Monitors

The High DPI support for WinForms is a mess. Microsoft requires these modifications to the project:

  1. In the project's app.config file insert these lines before the </configuration> line:
    <appSettings>
      <add key="EnableWindowsFormsHighDpiAutoResizing" value="true"/>
    </appSettings>
  2. Add a new app.manifest file to your application's project (Ctrl+Shift+A) and then uncomment these lines:
    <application xmlns="urn:schemas-microsoft-com:asm.v3">
      <windowsSettings>
        <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
      </windowsSettings>
    </application>
  3. Never run Visual Studio with a Screen resolution other than 100%. That will screw up the forms editor. (You probably aren't doing that, but I mention it for completeness.)
  4. Copyright Polar Engineering, Inc.