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 / .NET Framework / New Users / December 2004

Tip: Looking for answers? Try searching our database.

Forms & UCs get inflated in width at runtime!

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bill - 29 Dec 2004 17:50 GMT
I've having a very strange problem.
In a large solution it may occur only on 30-40% of the projects that include
Forms/UserControls.

I design the form at design-time, justify the controls etc.
But at runtime they get inflated in width! (they become about 20-25% larger
in width).

Seems like a serious bug, but i can't find the source that's causing the
problem...

Any help would be really appreciated

Thanks, Bill
Sylvain Lafontaine - 29 Dec 2004 18:22 GMT
What is the setting for your screen resolution, 96 DPI or 120 DPI? There are
many problems (bugs) associated with the fact of creating a form in 96 DPI
and then going to a screen set to 120DPI and vice-versa.

Take a look at the AutoScaleBaseSize and the AutoScale properties.

S. L.

> I've having a very strange problem.
> In a large solution it may occur only on 30-40% of the projects that
[quoted text clipped - 12 lines]
>
> Thanks, Bill
Bill - 29 Dec 2004 18:32 GMT
But runtime and designtime are on the same machine/screen and are 1 click
apart (the Run button).

And to be more specific about the nature of the problem, the form actually
gets enlarged in runtime. It doesn't only seems enlarged.
Example: in design time, the property grid says the form is  512,422 but in
runtime if a print a messagebox with the form's size, it prompts: 673,571
!!!!!

So, it's probably not a matter or resolution and DPI....

Bill

> What is the setting for your screen resolution, 96 DPI or 120 DPI? There are
> many problems (bugs) associated with the fact of creating a form in 96 DPI
[quoted text clipped - 20 lines]
> >
> > Thanks, Bill
Bill - 29 Dec 2004 18:51 GMT
Whatever was causing the problem, setting AutoScale to false solved the
problem.

Thank you veery much!!!

> But runtime and designtime are on the same machine/screen and are 1 click
> apart (the Run button).
[quoted text clipped - 34 lines]
> > >
> > > Thanks, Bill

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.