Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Automatically resize the controls based on screen resolution in C# application

Automatically resize the controls based on screen resolution in C# application

Scheduled Pinned Locked Moved C#
csharp
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    abyclassic
    wrote on last edited by
    #1

    Hi guys, How can we adjust the size of our individual controls & the main section (eg: group box in which our individual controls are placed), based on the screen resolution. ie, We develop an application in 1024*768 resolution. In the GUI, we have one or two group-boxes. Each group-box have different control which are added at run time. Now, if the user opens the application in 1024*768 resolution, all the controls are neatly positioned. But, if the user uses a different resolution, the size of the controls are not proportional. How can we achieve the proportional re-size of all the individual controls irrespective of the screen resolution Best Regards, Abhilash Chandran

    M 1 Reply Last reply
    0
    • A abyclassic

      Hi guys, How can we adjust the size of our individual controls & the main section (eg: group box in which our individual controls are placed), based on the screen resolution. ie, We develop an application in 1024*768 resolution. In the GUI, we have one or two group-boxes. Each group-box have different control which are added at run time. Now, if the user opens the application in 1024*768 resolution, all the controls are neatly positioned. But, if the user uses a different resolution, the size of the controls are not proportional. How can we achieve the proportional re-size of all the individual controls irrespective of the screen resolution Best Regards, Abhilash Chandran

      M Offline
      M Offline
      Marcel Gheorghita
      wrote on last edited by
      #2

      You should use SplitterBox controls and the Dock property of the group boxes (i.e. DockStyle.Fill).

      A 1 Reply Last reply
      0
      • M Marcel Gheorghita

        You should use SplitterBox controls and the Dock property of the group boxes (i.e. DockStyle.Fill).

        A Offline
        A Offline
        abyclassic
        wrote on last edited by
        #3

        Thank you for the reply. Using the splitter box we can have only 2 splitters. right? I feel tablepanel layout may be a better option. Still, i have to check if the requirement can be met fully using it. Because, as per the requirement, we must not simply increase the size of the controls based on the screen resolution. We must keep the alignment & size (may be a proportionate increase in size is ok). Ideally, the look must be similar to what happens if we change the resolution & see in our desktop. ie, still all the icons in desktop are proportional & no area is simply empty. Is there any other way to achieve the same.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups