0

I have a desktop app that I send out to clients. For one client on all the machines, it it consistently looks wrong in their resolution. I have created a virtual machine and set it to their resolution and, of course, everything looks fine. They are in 1280x1024. The app runs on about three dozen other machines at other customers just fine. I had them grab a screen print, here it is: customer screen shot that is malformed from their computer screen how it looks on dev, test, and other customers computers

Need to help! I have no idea why/what is needed here.

3 Answers3

0

Check DPI settings in Windows.

Windows 7: http://www.lawfirmsoftware.com/support/change_dpi_settings_windows_7.htm

Windows 8: http://www.eightforums.com/tutorials/28310-dpi-scaling-size-change-displays-windows-8-1-a.html

Windows 10: http://www.tenforums.com/tutorials/5990-dpi-scaling-level-displays-change-windows-10-a.html

Also see this question on how to update your own app: Disable DPI awareness for WPF application

Community
  • 1
  • 1
Dima
  • 1,717
  • 15
  • 34
  • is there any way around this on windows 10 that doesn't involve configurations on the client PC? – Computation Smomputation Jul 26 '16 at 17:07
  • Yes, see last link in my answer - you can update your app. – Dima Jul 26 '16 at 17:08
  • Thank you! I read that answer and I think it is saying I need to turn off DPI Virtualization? I don't see where it explains how to actually do that... – Computation Smomputation Jul 26 '16 at 17:15
  • Hi Dima: I really do appreciate you helping. I read that answer in detail and am still not entirely sure what to do. I can translate the C# code into VB, but I am not sure what "Then add something like xmlns:custom="clr-namespace:MyNamespace" to your top-level window definition, then enclose your DPI-independent user-interface with ...." means from a VB standpoint. Feels good to be getting close!! – Computation Smomputation Jul 26 '16 at 20:43
  • Why are you referring @ComputationSmomputation to answers for a WPF application. The question is tagged as being a WinForm application. – TnTinMn Jul 27 '16 at 03:37
0

Autoscalemode is set to FONT. Should I set it to NONE? Not really sure what that setting does... I am in VS 2015. – Computation Smomputation

As a first step, I recommend that you declare your application to be DPI aware. This done via the app.manifest file.

You can access this file in VS via:

Project Menu->ProjName Properties->Application Tab->View Windows Settings Button

Look for this block of code in the file:

  <!--
  <application xmlns="urn:schemas-microsoft-com:asm.v3">
    <windowsSettings>
      <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
    </windowsSettings>
  </application>
  -->

This section is commented out by default. To enable it, delete the first line (<!--) and the last line (-->).

Doing this will prevent DPI virtualization by the OS that can be thought of as a form bitmap scaling of the displayed form and its components.

If the resultant display is still messed up, try setting the Form.AutoScaleMode to either Dpi or None.

TnTinMn
  • 11,522
  • 3
  • 18
  • 39
  • Very cool thank you and very clear instructions!! I will make this change and send out to my customer and see if it works. When I change the DPI on the test machine I still do not have this problem so I can't test locally, but you never know. Fingers crossed.. – Computation Smomputation Jul 27 '16 at 22:30
  • @ComputationSmomputation, when you say "When I change the DPI on the test machine", are you changing it before compiling/running the code? Ideally, compile under one DPI setting and test under another. – TnTinMn Jul 27 '16 at 23:21
-1

Your error is very common. You only need to change the align property and disable the top one.

James
  • 4,146
  • 1
  • 20
  • 35
Leaf
  • 1
  • 2
  • Hi Leaf, thanks for the help, could you guide me little more, change the align property of what and disable the top what? Sorry, the graphics side of the house is not my specialty.. – Computation Smomputation Jul 26 '16 at 17:06