Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / Design Time / April 2004

Tip: Looking for answers? Try searching our database.

Scaling controls (C#)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
LR - 07 Apr 2004 20:44 GMT
I'm having problem scaling controls on the form. I have a form where
I'm adding my user control at design time. If I run at 96 dpi it looks
fine, all the controls inside my user control are sized and placed
correctly. As soon as I change font size to 120 dpi, the control and
all of it child controls are not looking right at design time.
Here's what happen when I run application:

1) If AutoScale of the form is set to true (at design time) and I'm
adding my control on the form load event, the control looks fine.
However, if I'll add control after form is loaded it doesn't look
right, all the controls inside of it are jammed.
2) If AutoScale of the form is set to false (at design time) and I'm
adding my control on the form load or after form is loaded it looks
the same as at design time – child controls look smaller and text
doesn't feet on the control's real-estate.

I would expect the controls to stay the same at 120 dpi as they were
at 96 dpi if AutoScale is set to false.

Can somebody help me with determining system current dpi and/or
rescale all the controls on the form based on current dpi.

Regards,
-Leo
Aaron A. Anderson - 18 Apr 2004 05:26 GMT
I have the exact same problem.  In fact, I forgot that I had my laptop set
for 120dpi and I could never get my app to look just right until I figured
out I had it set to 120dpi.

> I'm having problem scaling controls on the form. I have a form where
> I'm adding my user control at design time. If I run at 96 dpi it looks
[quoted text clipped - 20 lines]
> Regards,
> -Leo

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.