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

  • Home
  • SEARCH
  • 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 6084431
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:31:14+00:00 2026-05-23T11:31:14+00:00

I have a C# WinForms application and when I give the executable to different

  • 0

I have a C# WinForms application and when I give the executable to different users the application displays in different sizes (based on their screen resolution). Some of the parts of the application can’t be seen.

Is there anyway to auto-size the window based on the screen resolution, or is there another approach?

EDIT : furthermore it appears in different styles under different Operating systems, is there away to standardize its design ?

  • 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-23T11:31:15+00:00Added an answer on May 23, 2026 at 11:31 am

    You can use Control.ScaleControl and Control.Scale

    private void MainForm_Load( object sender, EventArgs e )
    {
        float width_ratio = (Screen.PrimaryScreen.Bounds.Width / 1280);
        float heigh_ratio = (Screen.PrimaryScreen.Bounds.Height / 800f);
    
        SizeF scale = new SizeF(width_ratio, heigh_ratio);
    
        this.Scale(scale);
    
       //And for font size
       foreach (Control control in this.Controls)
       {
          control.Font = new Font("Microsoft Sans Serif", c.Font.SizeInPoints * heigh_ratio * width_ratio);
       }
    }
    

    In the case when the development platform resolution is 1280×800

    According to @sixlettervariables ‘s answer Docking and anchoring will help of course.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a WinForms application which runs on a touch-screen on a bit of
I have a winforms application in which some of the data is stored in
I have written a .net winforms application that does some heavy processing and slows
I have a WinForms application with a DataGridView control and a column of DataGridViewButtonCell
I have a winforms application that normally is at about 2-4% CPU. We are
We have a WinForms application written in C# that uses the AxAcroPDFLib.AxAcroPDF component to
I have C# winforms application that needs to start an external exe from time
I have a winforms application that presently ships with a chm file for context-sensitive
I have a WinForms application with a view where the user selects a single
I have a Winforms application created in Visual Studio 2005 Pro, it connects to

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.