Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

The amazing shrinking form 1

Status
Not open for further replies.

diamondsc

Programmer
Jun 28, 2001
44
US
I am using VS 2005. I have just noticed that when I edit and save a windows form, the size of the form changes. When I close the form and reopen it, the size is 4 points smaller from the right and bottom edges. If I do this enough times, the controls on the form actually begin to move off the edge of the form. In other words, the controls don't move but the edges do. I can set the width and height of the form in vb and it displays correctly when executed but it continues to shrink while editing. What causes this and what can I do to make it stop? If I don't manually pull the edges back into place, the form will soon disappear from existence! I nee hel ple!
 
>>> I nee hel ple

Doh...the edges are already cutting off his words :p

Is the form inheriting it's dimensions from another form? I've never personally had this problem.

I did however have a pesky mouse that would grab edges and move them on me when i didn't want them to (one of those freaky laptop builtin mice :) ). Is it possible that this is happening?

Try setting the forms borderstyle to something else and then back to what you're using and see if that sets it. You could always set up anchoring and hardcode a starting size.
 
Thanks macleod! You saved my form from oblivion. I had the border style set to Fixed3D. I changed it to FixedDialog and now it is not the incredible shrinking form anymore. Fixed3D making the form dimensions change after closing it and reopening it is rather odd but I can certainly live with the changes. My world is stable once again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top