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
  • 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-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

First, a bit of my background. I have been working on large web systems
We have a large legacy VB app made up of a number of DLLs
I can develop an application/project. But that is not in the correct coding standard.
From the moment I have faced Python, the only thing I can say for
I am working with GXT to develop a web application. But I am finding
We are looking for an approach for developing a web based application which should
Status Quo For our customer we are developing some libraries and applications that run
I am a good PHP developer and wanted to develop a large scale web
After working on several large web applications, and seeing gigantic style sheets with no
I'm going to use a small example for reference. Consider a project with: inner_definitions.o

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.