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 3275162
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T19:06:52+00:00 2026-05-17T19:06:52+00:00

I have an large application developed in .Net Compact Framework 1.0 that has been

  • 0

I have an large application developed in .Net Compact Framework 1.0 that has been developed over the last 9 years with large amount of forms and custom controls. The application is designed for 240×320 screens. It scales good to a 480×640 screen when compiled with Compact .Net 1.0 and Visual Studio 2003.

I upgraded the application to .Net 2.0 using the default upgrade wizard of Visual Studio 2008. The application uses the full screen and all the controls are laid out as designed when using a device with resolution of 240×320. But the application uses only top left 25% of the screen when using a device with resolution of 480×640.

I tried using the code:
AutoScaleDimensions = new SizeF(96,96);
AutoScaleMode = AutoScaleMode.Dpi;

It works on the Form, but does not work on the dynamic controls (standard/custom) that are placed on the form.

Is there a way to force the application to use scaling similar to that done when complied using .Net 1.0, with out using the AutoScaleDimensions/AutoScaleMode properties.

Thanks.

  • 1 1 Answer
  • 1 View
  • 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-17T19:06:52+00:00Added an answer on May 17, 2026 at 7:06 pm

    I found a kind of solution to this problem.

    I get the scale-factor similar to the procedure explained by simons19 and then when adding any dynamically created control to the form, I call the method control.Scale(scale-factor). This solved my problem. Scale method scales both Location and Size of the control so, I set both location property and size property of the dynamically created control before calling the scale property.

    Example:

    Label lblTest = new Label();
    lblTest.Text = "A Test Label";
    lblTest.Location = new Point(10, 5);  //Designed in relation to a 96 dpi screen
    lblTest.Size = new Size(30, 10);      //Size Designed in relation to 96 DPI screen
    parentControl.Controls.Add(lblTest);
    //Scale Factor is calculated as mentioned by simons19
    lblTest.Scale(scaleFactor);           //Scale the control to the screen DPI.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Our large application (VB.Net, Framework 3.5) has been developed more or less from the
I have a rather large application that has literally a hundred DDLs with Yes
I have an ASP.NET application that does a large database read. It loads up
My company has developed (and still continues to develope) a large ASP.NET business application.
I have developed a PHP application that processes relatively large text files, and stores
I am fairly new to Rails and I have never developed a large application.
I have a large application that uses EJB 2.x entity beans (BMP). This is
I have a fairly large application that uses WPF for its user interface. I
I have developed a quite large application using MFC. Naturaly, I used GDI for
Scenario : I have an ASP.NET MVC application developed in Visual Studio 2008. There

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.