locked
Control Locations Change Position on Windows 8.1 and Windows 10 RRS feed

  • Question

  • I have some labels and textboxes in tabcontrol. When i run the program in Windows 7 everything looks fine, but when its in Windows 8.1 and Windows 10 lot of the control are moved from the original positions. I am using Visual Studio 2012 with .net Framework 4.5. I am using .net Reactor 4.9.9.0 also.. Anyone have idea of why this happening?

    Thank you,

    Shane

    here is the what looks like

     
    Thursday, April 21, 2016 6:44 AM

Answers

All replies

  • Perhaps Win8(x) or Win10 is running 120dpi rather than 96dpi. Both images you display look wrong. What does the correct image look like from Win7?

    AutoScaleMode problems with changed default font

    Also see below links.

    How to control the font DPI in .NET WinForms app

    Creating a DPI-Aware Application

    How to write WinForms code that auto-scales to system font and dpi settings?

    WinForms Scaling at Large DPI Settings–Is It Even Possible? - At this link note the info concerning entries for the applications manifest file I believe. Which is also in the below link ref'd in this link. I don't know if that works or not but it would be simplest to alter the manifest to see if it does.

    Manifest Madness - See paragraph on High DPI. However as far as I know rather than adding ref to some text file I thought that you just added appropriate info to the applications manifest file.

    This seems to be a good article on the subject also - Per-Monitor DPI Aware in Windows Forms.


    La vida loca

    • Edited by Mr. Monkeyboy Thursday, April 21, 2016 7:17 AM Combined other posts into this post.
    • Proposed as answer by Cor Ligthert Thursday, April 21, 2016 7:43 AM
    • Marked as answer by Jeffrey Shane Saunders Tuesday, May 17, 2016 6:36 AM
    Thursday, April 21, 2016 6:55 AM
  • Hello Mr. MonkeyBoy,
       This is what suppost to look like, I just ran it on my pc.

    Shane

    Thursday, April 21, 2016 7:38 AM
  • Then I should think it's a dpi aware issue with Win8(x) or Win10. Have you looked in control panel on those systems to see what their screen resolution is set to? I don't know how to do that for them or see what they're using for dpi settings.

    La vida loca

    Thursday, April 21, 2016 8:18 AM
  • Hello Mr. Monkyeyboy,
       I have not check it yet.. i didnt think the dpi could case the problem with it. I will check in a test pc..

    Shane

    Thursday, April 21, 2016 10:09 AM
  • Hi Jeffrey Shane Saunders,

    >> I have not check it yet.. i didnt think the dpi could case the problem with it. I will check in a test pc..

    Does this issue happen on all Win 8.1 and Win 10 machine? You’d better do more test on other machines to check whether this issue is related to special machine environment.

    If it happens on all win 8.1 and win 10 machine, you could first refer to following link to check the differences of .net framework between win7 and win8.1, win 10. If there are some .net framework have been install win 7, not in 8.1 and 10, you could try installing them and then try again.

    https://blogs.msdn.microsoft.com/astebner/2008/10/13/net-framework-setup-verification-tool-users-guide/

     

    Or, you modify your code to first check the OS Version and then set proper table size and position to solve this issue.

    For avoiding this issue, I suggest you’d better generate a whole table that could contains the three child tables to show the information.

    Best Regards,

    Albert Zhang

    Friday, April 22, 2016 7:40 AM
  • Hello Albert,

      I this is happening on Windows 8.1 and 10 Chinese installations. I check the one pc DPI and its set to 96 DPI. I dont think it is to much of concern now. I am going change everything to spreadsheet grid and it will fix the problem.

    Shane

    Tuesday, May 3, 2016 8:40 AM
  • Hi Jeffrey Shane Saunders,

    >>I check the one pc DPI and its set to 96 DPI. I dont think it is to much of concern now. I am going change everything to spreadsheet grid and it will fix the problem.

    Thank you for your response.

    As I suggested above, it’s better for you create a whole table to show the report. Combing multiple tables into one is not good method in this case. Besides, if some of above replies are helpful to you, you could mark them as answer to close this thread.

    Thank you for your understanding and support.

    Best Regards,

    Albert Zhang

    Tuesday, May 3, 2016 9:33 AM
  • Hello Albert,

      I this is happening on Windows 8.1 and 10 Chinese installations. I check the one pc DPI and its set to 96 DPI. I dont think it is to much of concern now. I am going change everything to spreadsheet grid and it will fix the problem.

    Shane


    Does that mean altering the DPI on a PC caused the problem with the application to go away?

    La vida loca

    Tuesday, May 3, 2016 11:40 PM