locked
Auto Fit to any screen resolutions RRS feed

  • Question

  • i have tried all those help. In my apps there are lot of controls. Tell me how to fit my windows application to any screen resolution????
    • Moved by CoolDadTx Monday, March 25, 2013 2:13 PM Winforms related
    Monday, March 25, 2013 1:53 PM

Answers

  • Hi AroAugustin,

    Windows Forms application support Font and DPI AutoScaleMode. There isn't much support for screen resolution. To change auto scale mode to Font or DPI, here is the detailed information about automatic scaling in Windows Forms: Automatic Scaling in Windows Forms

    In order to avoid disordered UI, you can also try to set Dock and Anchor properties. FlowLayoutPanel and TableLayoutPanel are also useful to lay out the controls dynamically.

    By the way, WPF applications are designed to measure all elements using device-independent uint. You may have a try if you are interested in this technology.

    Best regards,


    Chester Hong
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Proposed as answer by Cor Ligthert Tuesday, March 26, 2013 7:04 AM
    • Marked as answer by Chester Hong Wednesday, April 3, 2013 9:20 PM
    Tuesday, March 26, 2013 6:04 AM
  • Use the Anchor or Dock properties on each Control (or override the relevant OnLayout methods) to handle resizing within the application.

    Design your application to work on the lowest resolution you intended to support - I still recommend 1024x768.  If the user happens to have a different screen size or resolution then allow the application to grow sensibly - lists, grids, etc. should "grow" to use the available screen real estate; textboxes and buttons [generally] shouldn't.

    Do not attempt to make your application look "the same" on every screen resolution because (a) you can't; different aspect ratios completely mess up that idea and (b) people tend to run at higher resolutions to get more applications on their screen at the same time, not to have the same number of applications, "only bigger"!



    Regards, Phill W.

    • Marked as answer by Chester Hong Wednesday, April 3, 2013 9:20 PM
    Wednesday, March 27, 2013 1:38 PM

All replies

  • Hi AroAugustin,

    Windows Forms application support Font and DPI AutoScaleMode. There isn't much support for screen resolution. To change auto scale mode to Font or DPI, here is the detailed information about automatic scaling in Windows Forms: Automatic Scaling in Windows Forms

    In order to avoid disordered UI, you can also try to set Dock and Anchor properties. FlowLayoutPanel and TableLayoutPanel are also useful to lay out the controls dynamically.

    By the way, WPF applications are designed to measure all elements using device-independent uint. You may have a try if you are interested in this technology.

    Best regards,


    Chester Hong
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Proposed as answer by Cor Ligthert Tuesday, March 26, 2013 7:04 AM
    • Marked as answer by Chester Hong Wednesday, April 3, 2013 9:20 PM
    Tuesday, March 26, 2013 6:04 AM
  • Use the Anchor or Dock properties on each Control (or override the relevant OnLayout methods) to handle resizing within the application.

    Design your application to work on the lowest resolution you intended to support - I still recommend 1024x768.  If the user happens to have a different screen size or resolution then allow the application to grow sensibly - lists, grids, etc. should "grow" to use the available screen real estate; textboxes and buttons [generally] shouldn't.

    Do not attempt to make your application look "the same" on every screen resolution because (a) you can't; different aspect ratios completely mess up that idea and (b) people tend to run at higher resolutions to get more applications on their screen at the same time, not to have the same number of applications, "only bigger"!



    Regards, Phill W.

    • Marked as answer by Chester Hong Wednesday, April 3, 2013 9:20 PM
    Wednesday, March 27, 2013 1:38 PM