473,657 Members | 2,845 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

vs 2005 changes my form size(?)

I inherited a vs2003 project which I've converted into vs2005 to run
under .net 2.0. The conversion was fine and the project compiles and
runs just fine until today. A user called me up asking why they cannot
see the bottom of the form anymore (it's a fixed height form).

I opened the project again and looked at the form and sure enough, it's
exactly 180 pixels less than it used to be. Thinking I messed up, I
fixed the form, recompiled and everyone was happy....until today. I
opened the project to start the redesign into vs2005 and when I opened
the form in the designer VS made the form 180 pixels smaller. I
dragged out the height, saved, exited, started again and once again,
the damm designer shrinks the form.

I've had to add code in now to set the form height when run, just in
case it happens again, but has anyone else run into this?

I've never had this happen with a new project started in vs2005.

Apr 5 '06 #1
7 2316
Check the AutoSize property on your form. It might be set to true.

"gr***********@ gmail.com" wrote:
I inherited a vs2003 project which I've converted into vs2005 to run
under .net 2.0. The conversion was fine and the project compiles and
runs just fine until today. A user called me up asking why they cannot
see the bottom of the form anymore (it's a fixed height form).

I opened the project again and looked at the form and sure enough, it's
exactly 180 pixels less than it used to be. Thinking I messed up, I
fixed the form, recompiled and everyone was happy....until today. I
opened the project to start the redesign into vs2005 and when I opened
the form in the designer VS made the form 180 pixels smaller. I
dragged out the height, saved, exited, started again and once again,
the damm designer shrinks the form.

I've had to add code in now to set the form height when run, just in
case it happens again, but has anyone else run into this?

I've never had this happen with a new project started in vs2005.

Apr 5 '06 #2
The autosize is set to false and the forms size is set in the form
designer. While annoying it's not a major thing as I'm recreating this
project from scratch to clear out some of the 'wtf' code. This form
resize issue is part of that 'wtf'.

Apr 6 '06 #3
What is the size of the form and what is the resolution of the screen?
You cant create a form that is larger than the resolution of the
screen. We ran into this issue when trying to design for a screen that
is larger than the development monitor could support. We had to get
new monitors to develop at the correct size.

You might also check the resolution on all the machines to see if they
are at 72dpi or 96dpi or even higher. Perhaps differences there might
be causing a problem.

Apr 6 '06 #4
I'm developing at 1920x1280 and the form size is fixed at 800x800.
This appears to be limited to my machine as others have opened the
project under vs2005 and it hasn't pulled it's form-size changing bit
on their machines. I've got a number of extensions I use in VS so I'm
poking around seeing if one of them is doing it.

Apr 6 '06 #5
_DD
On 6 Apr 2006 09:03:57 -0700, "gr***********@ gmail.com"
<gr***********@ gmail.com> wrote:
I'm developing at 1920x1280 and the form size is fixed at 800x800.
This appears to be limited to my machine as others have opened the
project under vs2005 and it hasn't pulled it's form-size changing bit
on their machines. I've got a number of extensions I use in VS so I'm
poking around seeing if one of them is doing it.


Greg,

Not sure if this is relevant, but there are differences between the
code from a VS2003-generated form and VS2005. If it's a scaling
problem, you could try changing to the newer float format to see if
that helps.

While I haven't seen an problems created by porting VS2003 code, this
could be the source of what you're seeing.

Note, in the code below:
2003 uses AutoScaleBaseSi ze ... DrawingSize(5, 13)
2005 uses AutoScaleDimens ions ... DrawingSizeF(6F , 13F)

2005 also adds AutoScaleMode() ...

Excerpt from generated code from similar sized forms:

VS2003:
//
// Form1
//
this.AutoScaleB aseSize = new System.Drawing. Size(5, 13); this.ClientSize = new System.Drawing. Size(292, 266);
this.Controls.A dd(this.button1 );
this.Name = "Form1";
this.Text = "Form1";
this.ResumeLayo ut(false);
}

VS2005:
//
// Form1
// this.AutoScaleD imensions = new System.Drawing. SizeF(6F, 13F);
this.AutoScaleM ode = System.Windows. Forms.AutoScale Mode.Font;

this.ClientSize = new System.Drawing. Size(292, 266);
this.Controls.A dd(this.button1 );
this.Name = "Form1";
this.Text = "Form1";
this.ResumeLayo ut(false);
}

I initially thought that you'd need to change the float '6F' to '5F'
to stay the same size as the 2003-generated code, but this does not
appear to be the case.

Off-subject: What type of LCD are you using at 1920x1200? I just saw
a Samsung wide-screen (242?) next to a Sony and the Samsung looked
brighter and more vibrant. Do you have to set a custom font scaling
to read code all day without fatigue?

Please follow up if you manage to fix this. I'm curious about effects
of porting 2003 code.
Apr 9 '06 #6
Well hot damm. I had set the .AutoScaleDimen sions manually after the
conversion to 2005 yet I never set .AutoScaleMode. After setting
AutoScaleMode I can open the form without VS shrinking the form size on
me. It's always the small things...
As far as the monitor goes I have the Dell FP 24" monitor and I sit
back around 26 inches from the screen and I can read the font in VS at
standard 10 point Courier without a problem nor do I get eye strain.
The only drawback I find is siting down at other people's monitors to
look at code I feel like I'm stepping down to a 14" grayscale monitor.
With the Dell monitor (I don't know about the Samsung) you can rotate
the whole monitor around 90 degrees and get a portrait view of your
code.

Apr 9 '06 #7
_DD
On 9 Apr 2006 09:33:03 -0700, "gr***********@ gmail.com"
<gr***********@ gmail.com> wrote:
Well hot damm. I had set the .AutoScaleDimen sions manually after the
conversion to 2005 yet I never set .AutoScaleMode. After setting
AutoScaleMod e I can open the form without VS shrinking the form size on
me. It's always the small things...
That's one of the tricky aspects of porting old code. I did quite a
few forms before I got the hang of it. The cool thing about VS2005,
of course, is that you can now split all the ugly pre-generated code
into a separate module, thanks to partial classes.

I usually port VS2003 code by generating a new empty project with a
form and one button. That gives me location within the source files
where the compiler is storing controls (that has shifted around in
VS2005). I swap the old controls in for the button, change the form
size in the functions we talked about, and a couple other minor
things.
As far as the monitor goes I have the Dell FP 24" monitor and I sit
back around 26 inches from the screen and I can read the font in VS at
standard 10 point Courier without a problem nor do I get eye strain.


Good to know. I was also looking at the Dell monitor, but I haven't
seen one in person yet.

Apr 10 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
2132
by: sathyashrayan | last post by:
Following are the selected thread from the date:30-jan-2005 to 31-jan-2005. I did not use any name because of the subject is important. You can get the original thread by typing the subject "string" in google comp.lang.c archives.Hope this helps.Hope I am not bothering any one. am I? =================================Start=========================== subject: Return to Start of Line? Question: I'd like printf, the next printf, to return...
0
8384
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8820
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8718
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8499
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8601
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5630
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4300
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1937
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1601
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.