When i open a form in visual studio 2005 (c#) the designer automaticaly resize the form and move/resize controls without touching the designer at all. The source file is changed and when i close the designer i'm asked to save the *.cs file. I tried to look into visual studio options without any success. any ideas? visual studio setup or something? thanks, Tal
This is one you should live with. Even in VS2008 such things happen from time to time. It is mostly depends on form content (controls, positions, etc), and there is no option in VS to disable such behavior.
When you open your form in designer, vs runtime rebuilds visual appearance from code behind. And sometimes it made changes at this moment. Also when you are simply adding one control to form, designer fully rebuilds codebehind and resource files. This is well known issue, and seems that MS won't fix it, because they move in WPF direction.
So several points to simplify your life:
- Move to VS2008, designer were more consistent, but still shuffle controls in .designer.cs file
- Place your code in one of the source repositories, so if you accidentally saved such form, you can restore it from repositary.
I found a work around.
not sure what happens behind but i changed my display properties. and it works fine. here is the sequence: display propertis->settings tab->advance. in the the advance dialog i changed the "DPI Settings" from Large (120dpi) to Normal (96 dpi)