none
I have created a form1.vb with specific sizes and positioning on one of my notebooks; once i load this form on another notebook the whole layout is changed by the designer ?

    Question

  • 1) How do I retain the original layout - I am using the same version of IDE (Visual Studio 2017 RC)

    2) The ram size of both notebooks is the same 8GB and the notebooks are of different makes . . . The one where the form1.vb was created is a Lenovo Thinkpad the other a partitioned windows MacBook - Both running windows 10 Pro and Visual Studio 2017 RC.

    3) I have set the resolution on both PC's to match one another 1920x1080.

    4) The windows Macbook (Running of Bootcamp) on loading of the form1.vb auto changes it's settings and the form layout and form controls are all changed.

    I need to know why this is happening and also what can I do to keep the original form intact ; somehow the designer is auto formatting the form - how can I stop this.

    Your help will be most appreciated 


    Wednesday, November 30, 2016 3:22 AM

Answers

  • Hi BASit Bulbulia,

    I'm using Visual Studio 2015, so don't know if this is available to VS 2017 RT.
    I usually set "AutoScaleMode" to "Dpi",
      
    and add a file "app.manifest" and remove comment like below.
    <dpiAware xmlns...> 

    Regards,
    Ashidacchi
    • Edited by Ashidacchi Wednesday, November 30, 2016 4:45 AM
    • Marked as answer by BASit Bulbulia Friday, December 02, 2016 5:55 AM
    Wednesday, November 30, 2016 4:44 AM
  • *Phew*

    I finally got it to work... What I had to do is set Autoscale mode to DPI ( was on inherit) on the Lenovo Notebook - then save and copy the form1.vb to the Macbook ...

    What a relief - Thank you to all you guys for guiding me along the way.

    • Marked as answer by BASit Bulbulia Friday, December 02, 2016 12:15 AM
    Friday, December 02, 2016 12:15 AM

All replies

  • Hi BASit Bulbulia,

    I'm using Visual Studio 2015, so don't know if this is available to VS 2017 RT.
    I usually set "AutoScaleMode" to "Dpi",
      
    and add a file "app.manifest" and remove comment like below.
    <dpiAware xmlns...> 

    Regards,
    Ashidacchi
    • Edited by Ashidacchi Wednesday, November 30, 2016 4:45 AM
    • Marked as answer by BASit Bulbulia Friday, December 02, 2016 5:55 AM
    Wednesday, November 30, 2016 4:44 AM
  • Ashidacchi, I have tried the above and it makes it much worse
    Wednesday, November 30, 2016 5:28 AM
  • Hi BASit Bulbulia,
    Which version of .NET Framework do you use for your application?

    # I'm using higher than 4.6.1.

    • Edited by Ashidacchi Wednesday, November 30, 2016 5:44 AM
    Wednesday, November 30, 2016 5:41 AM
  • If the form is resizable, do you observe the same behaviour if you start the program without Visual Studio on your first notebook, then resize the form?

    In case of resizable forms, it is important to use the Anchor and Dock properties of controls correctly.

    Also try AutoScaleMode: Font.

    Wednesday, November 30, 2016 5:45 AM
  • I am only targeting an early .net framework 2 .

    The only autoscale mode that works best is (inherit) - tried others makes it worse.

    The lenovo loads the form correctly with no problems. The windows macbook will load and compile and display the form correctly as long as the form is not loaded into the designer.  As soon as the form is loaded it changes the layout . . .

    I have anchored and docked the controls correctly.


    Wednesday, November 30, 2016 11:02 AM
  • Hi BASit Bulbulia,

    According to your description, please try your steps in VS2015 to observe whether has the same issue. Because VS2017 final version has not been released, and VS2017 RC may be unstable. So I suggest you could try your steps in VS2015 Update3 or VS2013 Update 5 to observe whether has the same issue.

    Sincerely,

    Oscar


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, December 01, 2016 10:50 AM
    Moderator
  • Hi Oscar

    I loaded Visual Studio 2015 Update 3 on my second notebook (Macbook with bootcamp windows partition) and I have the same problem on this notebook when using VS2015.

    How could i show/resolve this problem. Is there a contact at the development team of Visual Studio where I could display this problem to ?

    Thursday, December 01, 2016 11:51 PM
  • *Phew*

    I finally got it to work... What I had to do is set Autoscale mode to DPI ( was on inherit) on the Lenovo Notebook - then save and copy the form1.vb to the Macbook ...

    What a relief - Thank you to all you guys for guiding me along the way.

    • Marked as answer by BASit Bulbulia Friday, December 02, 2016 12:15 AM
    Friday, December 02, 2016 12:15 AM
  • Hi,

    What you did is what I had said.
    If so, you may forget mark my post as an answer.

    Regards,
    Ashidacchi
    Friday, December 02, 2016 2:38 AM