This sample uses DPI Awareness APIs to show how to implement basic application functionality for a per-monitor DPI aware application. This includes operations like scaling a window, selecting new fonts, and re-rendering the window's content when the window moves to a monitor with a different DPI.

Warning  This sample requires Microsoft Visual Studio Ultimate 2013 and doesn't compile in Microsoft Visual Studio Express 2013 for Windows.

Operating system requirements

Client
Windows 8.1
Server
Windows Server 2012 R2

Build the sample

  1. Start Microsoft Visual Studio and select File > Open > Project/Solution.
  2. Go to the directory in which you unzipped the sample. Go to the directory named for the sample, and double-click the Visual Studio Solution (.sln) file.
  3. Press F7 or use Build > Build Solution to build the sample.

Run the sample

To debug the app and then run it, press F5 or use Debug > Start Debugging. To run the app without debugging, press Ctrl+F5 or use Debug > Start Without Debugging.