Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6116095
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:10:01+00:00 2026-05-23T15:10:01+00:00

I want my winform app controls to be at a certain location and a

  • 0

I want my winform app controls to be at a certain location and a certain size no matter what screen resolution the user is using.

Could someone give me a quick example of how to shape a panel to start at 60% down on the screen to 100% down on the screen, and to be the full length of the screen?

I hope that made sense, so basically no matter what the screen resolution is, the panel will take up 40% of the winform starting 60% down on the app.

Thanks!

I want the same % to be no matter if the resolution is 800X600 or 1024X760.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T15:10:02+00:00Added an answer on May 23, 2026 at 3:10 pm

    You can use SplitContainer, which divides the form into two areas. If you change it’s orientation to horizontal, you get 2 areas, one which starts on the top of the screen and the second on the other side. Now you can define minimal sizes of each of the panel:

    SplitContainer.Panel1MinSize = Convert.ToInt32(0.6 * Form.ActiveForm.ClientSize.Height);
    SplitContainer.Panel2MinSize = Convert.ToInt32(0.4 * Form.ActiveForm.ClientSize.Height);
    

    This makes the top panel take 60% of the client area and the bottom 40% of it. It’ll automatically start 60% down on the form. Then you can put any other control you want into the panel and dock it to the panel using Control.Dock = DockStyle.(something)

    The other way how to change the position of any control is to basically compute it’s position and size. You can get the width of the client area as Form.ClientSize.Width and the beginning X, Y position of the 60% down on the app as:

    int X = 0; // Leftmost
    int Y = Convert.ToInt32(0.6 * Form.ClientSize.Height); // 60% from topmost point
    

    Now you can set the control’s size and position as:

    Control.Size = new Size(Form.ClientSize.Width, Convert.ToInt32(0.4 * Form.ClientSize.Height));
    Control.Location = new Point(0, Convert.ToInt32(0.6 * Form.ClientSize.Height);
    

    So if you’d like to force for example label1 in Form1 to act like you wrote in your post, one possibility would be this:

    private void Form1_Resize(object sender, EventArgs e)
    {
        label1.Size = new Size(this.ClientSize.Width, Convert.ToInt32(0.4 * this.ClientSize.Height));
        label1.Location = new Point(0, Convert.ToInt32(0.6 * this.ClientSize.Height));
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing a c# winform app which controls a website using web browser.
In my winform app in VB.NET I want to use the localization option. But
Lets say I have multiple DataGrids throughout my winform app and I want to
I am using Crystal Report 2008 with C# , have a WinForm and want
I want to write a simple text file from my winform app in c#
I want my C# WinForms app to run some code when either the app
I have WinForms app and multiple forms and want to use ErrorProvider component on
I've got a legacy WinForms app and I want to save the window position
I want to make a right click menu for my winforms app. It will
Ok, I have a winforms app and my code works fine. But I want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.