Switching localizable forms language messes up design

M

mr.newsgroupguy

I have a C# windows forms project that was designed in Visual Studio
2003. It works great. I have recently decided to upgrade to VS 2005
and .Net 2.0. I opened the project in VS 2005 and it converted it
fine. I fixed the odd obsolete line of code and it compiles and runs.

The problem is that my previous design was done with the systems
display set to Large Fonts. My new dev system is set to Samll Fonts
because this is the default setting in windows. These means I have had
to go into each form and modify it slightly but that is fine.

Now, my program is setup to be localizable between english(default) and
french. Whenever I need to make a change to a french version of a form
I just change the language in the form properties to french and boom,
there it is. Now this worked perfectly in VS 2003 but in VS 2005 when
I try to change the language back to english(default) after making a
mod to the french version, my whole form gets screwed up. The
background colour of the form and almost all of the text box properties
get reset to the windows default settings. The biggest problem about
this is that it is a big form with over a hundred labels and text boxes
so to have to change it back all of the time can be very time
consuming.

I have tried everything imaginable to get it to stop doing this. I
even removed the french resx file, and switched my form to not
localizable, then I switch it back and re-create the french resx file,
and whenever I go back to english, it is all messed up.

Does anyone have a clue as to what is wrong? Unfortunately I cannot
post the code for the form as it is secret in nature.

Thanks in advance,
Scott
 
M

mr.newsgroupguy

This is not a code problem though, as it is just when I switch the
language property of the window back from french to default.

I have noticed that where the changes are being made is in the
InitializeComponent function. When I have the french form open, the
InitializeComponent function has all of the proper colours and settings
listed for the objects, but right after I switch back to the english
form, almost all of the settings have been removed or set to null in
the InitializeComponent function. When I do a Diff between the before
and after you can see that there is a lot missing, in fact 3000 lines
of code are gone. Where have they gone to???

Oh, and if I go back to the french form it is fine.

Scott
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top