none
VS2010 Form being cropped at run time on Laptop Resolution

    Question

  • Hi I have developed a VS2010 application in Windows 7.
    I am also using InstallShield Premier to create an Setup.exe/MSI as usual.

    The problem is that my splash screen is being cropped on the right hand side when I install on to a laptop which has a screen resolution of 1366 x 768.  (On a desktop of 1900 x 1080 it is fine, both the forms are visible).

    My main form is of size 1330 x 848 and appears ok albeit snug. The Splash screen form is only of size 562 x 398 so this should in theory fit well easy but this form is being cropped by say 25% on the right. So only 75% of the Splash screen is visible missing out the "Skip" button on the right. This form does have a progress bar using a timer and a centre logo, can't think why this would have any bearing.

    I am aware if the Form Autosize attribute, Autosize to True and have tried looking in the Installshield parameters to no avail.

    I have recently added a background (and stretch to fill) to both Forms which may have some bearing on the matter but doubt it.

    Any help would be greatly appreciated, Thanks in advance.


    Kuldip Mond


    • Edited by Kuldip Mond Thursday, January 21, 2016 12:14 PM
    Thursday, January 21, 2016 11:34 AM

Answers

All replies

  • Hi Kuldio Mond,

    As far as I know, this is the default action of WinForms applications when we change the screen resolution.

    If you want to show all content in Windows Forums, you can try set the window's AutoScroll property as True. When the controls can't show in window, it will show a scrollbar to let you see the control.

    Best Regards,
    Weiwei

    Friday, January 22, 2016 7:34 AM
    Moderator
  • Thanks for the reply.

    Using autoscroll unfortunately does not resolve the problem as you would not expect a user to scroll on a Splashpage.

    I have had no option but to re-jig the entire form layout to conform to a 1366 x 768 laptop resolution and this works fine but I have had to adjust the width of the field/pictures etc unproportionally to get the correct look. For example the timer progress bar is a lot wider than the logo in order for it to show at the correct width at Laptop resolution, likewise with the height of the logo etc...

    I believe there is some issues with the aspect ratio or widescreen peculiarities comeing into play here without me realising it.

    Some how the what you see is not what you get when you install and deploy. I need to find the root cause or go through the process of probe for the screen resolution from the host PC and then  set form width(s) accordingly.

    Thanks Kuldip.


    Kuldip Mond

    Friday, January 22, 2016 9:39 AM
  • Hi Kuldio Mond,

    Since it is the default behavior of Visual Studio, please refer to following thread which has the same problem with yours and other communities provided some suggestions. For example, using WPF, which  is vector-based, and gets around the problem of DPI.

    https://social.msdn.microsoft.com/Forums/vstudio/en-US/6e0ecb8c-ccc3-46c7-8524-b0d52964d3f9/high-dpi-messing-up-my-winform-sizes?forum=visualstudiogeneral

    But I'm afraid that there won't have a solution for this issue directly. I suggest you add comments for below feedback. This problem has been posted by other communities. Thanks for your feedback.

    https://visualstudio.uservoice.com/forums/121579-visual-studio-2015/suggestions/7373263-winforms-designer-dpi-lock

    Best Regards,
    Weiwei

    Monday, January 25, 2016 1:44 AM
    Moderator