Reusing Forms from other Projects

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have forms in Project A that I would like to re-use in Project B.
Currently, I am using the add feature from the solution explorer to add an
exisitng item to my project. My problem is that now Project A is now
required by Project B to build. Is there some way to cut the umbilical chord
between the origional source of the forms and the new project that is using
them?

Fred
 
You may need to update your using/import statements (if they refer to
namespaces in the original project). It's also a good idea to update the
namespace if it still contains terms specific to the original project.
 
Can you elaborate a little on the procedure for updateing a namespace. This
is new terminology for me.
 
Near the top of your form class file you'll see something like:
***
namespace WindowsApplication1

{



public class Form1 : System.Windows.Forms.Form

***

To update the namespace, you just change "WindowsApplication1" to whatever
the other files in your project use. That should remove the errors that make
it seem like you need the original project.
 

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

Back
Top