Link to home
Start Free TrialLog in
Avatar of carl-
carl-

asked on

Visual Studio 2005 - Add existing item - Form

Hi,
  When I try to use a form from an old project in my new project, I can usually Right click on the project, then hit "Add" | "Existing Item" then point to my windows form in my old project and all is good.

However if the form  has an embedded image for a background image, when I try and open up that form in my new project, all I get is

some HTML stuff saying something about
...
this.BackgroundImage = global::myProject.Properties.Resources.splash4;
The code within the method 'InitializeComponent' is generated by the designer and should not be manually modified.  Please remove any changes and try opening the designer again.

how do I fix this?

Thanks

Avatar of rogerard
rogerard
Flag of United States of America image

When you're adding the old form, make sure you also add it's associated files, like it's .resx and/or .designer.vb
Avatar of carl-
carl-

ASKER

the associated forms designer.cs and form.resx get added automatically.  Problem is the background image is under the global resource:  Properties Resources.resx Resources.Designer.cs and the namespace was different, so it cant find it and thus cant open.  I cant figure out how to change the namespace of that resource in the form that wont open because well, it wont open :-)
ASKER CERTIFIED SOLUTION
Avatar of carl-
carl-

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of carl-

ASKER

sorry, make that default Namespace name. (That is supplied by right clicking on the project and reading the application tab's default namespace.
Avatar of carl-

ASKER

if there was an "Award Points" for answering without "Accepting as solution" I'd gladly do that, but it wasn't the solution so I cant.
Avatar of carl-

ASKER

just closing out question that I figured out.