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 / January 2006

Tip: Looking for answers? Try searching our database.

VS2005 Windows Form Designer - Small vs. Large fonts

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mike Baker - 23 Jan 2006 17:58 GMT
We have a .NET Windows form project we are working on in VS2005 that is
stored in source control.  A developer using large fonts on his dev machine
creates a form and checks in the files.  Another developer using small fonts
gets the latest files.

When the developer using small fonts opens the form in design view, studio
wants to automatically check out the form, and changes the source file.  Now
the form looks different than it did on the machine with large fonts.

Our goal is to not have the form scale at all, but we are having some issues
getting it to work.

We have tried setting the 'AutoScaleMode' property to 'None', but have not
had success.

Suggestions?

Thanks
Signature

Mike

Mike Baker - 23 Jan 2006 20:06 GMT
**UPDATE**  The project was originally created in VS.NET 2003.  Looks like
the conversion process in VS2005 left the forms a little half-baked...
Signature

Mike

> We have a .NET Windows form project we are working on in VS2005 that is
> stored in source control.  A developer using large fonts on his dev machine
[quoted text clipped - 14 lines]
>
> Thanks
"Jeffrey Tan[MSFT]" - 24 Jan 2006 06:01 GMT
Hi Mike,

Thanks for your post.
To isolate your problem, I suggest you perform some test steps listed below:
1.    If we do not use VSS, in large font development machine, first close
IDE, then change font to small and open the IDE, compile the project,
re-close it. At last, change the font back to large and re-open the project
IDE, does this problem exist?
2.    If #1 can be reproduced out, we can create a simple test project in
VS.net2003, and follow steps in #1, does this problem exist?
3.    If #1 can be reproduced out, we can create a simple test project in
VS2005, and follow steps in #1, does this problem exist?
With these 3 steps, we can determine this problem lies with VSS, VS.net2003
or VS2005.

Once you have finished these tests, can you provide definite steps to help
us reproduce the problem? Then we can understand it better.

I look forward to hearing from you. Thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Signature

Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Mike Baker - 24 Jan 2006 13:18 GMT
Here's a rundown of what happened.

The original code file for the form had the following lines (for the form
itself):

           this.AutoScale = false;
           this.AutoScaleBaseSize = new System.Drawing.Size(6, 15);

When the project was converted to VS2005, these 2 lines were left unchanged
by the converter.

When we compiled the code, a warning was issued about the 'AutoScale'
property, indicating we should now use the 'AutoScaleMode' property instead.

Initially, we tried checking-out the form, and adjusting the property in the
designer.  As soon as you opened the form in the designer (on a box with a
different font setup), the size of the form and its controls would be
adjusted, which is not what we wanted.

Our second stab at this was to go back, and just adjust the 'AutoScale' line
in the code file for the form.  While this allowed the code to compile OK, it
still did not solve the problem we were having when we opened the form in the
designer.

Ultimately, what we did was remove the 'AutoScaleBaseSize' line from the
form's code file, as well as adjust the line for 'AutoScale' (to
'AutoScaleMode').  This was as a result of creating some forms from scratch
within VS2005 to understand the behavior.

This has completely solved the issue we were having in the designer.

It appears the converter could have handled this a little better, but maybe
there is something we are not considering as to why it didn't.  Either way,
it has caused us some frustration, so maybe this post will help someone else
out.

Regards
Signature

Mike

> Hi Mike,
>
[quoted text clipped - 21 lines]
> Get Secure! - www.microsoft.com/security
> This posting is provided "as is" with no warranties and confers no rights.
"Jeffrey Tan[MSFT]" - 25 Jan 2006 06:30 GMT
Hi Mike,

I am glad your problem is resolved and thank you for sharing you solution
with the community.

Based on your reply, I am still not understand your problem context very
well. So it is hard for me to provide some useful comment regarding your
solution. Anyway, if you need further help, please feel free to post. Thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Signature

Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.


Rate this thread:







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.