locked
can i copy a form from one project to another project RRS feed

  • Question

  • hello to the experts,

    can i copy a form from one project to another project?, how could i do it?

    thank you
    .madix_t
    Saturday, May 23, 2009 6:34 AM

Answers

  • Right Click your Project name in Solution Explorer | Select Add Existing Item | Browse to your Old project Folder from where you want to copy form | Select form.vb file | Click Add

    Or You can even Drag the Form.vb file to your Solution Explorer and Drop in project

    Thanks

    - Omie
    • Marked as answer by Madix_t Saturday, May 23, 2009 11:07 AM
    Saturday, May 23, 2009 9:51 AM

All replies

  • Right Click your Project name in Solution Explorer | Select Add Existing Item | Browse to your Old project Folder from where you want to copy form | Select form.vb file | Click Add

    Or You can even Drag the Form.vb file to your Solution Explorer and Drop in project

    Thanks

    - Omie
    • Marked as answer by Madix_t Saturday, May 23, 2009 11:07 AM
    Saturday, May 23, 2009 9:51 AM
  • thanks omie
    .madix_t
    Saturday, May 23, 2009 11:08 AM
  • After looking at the replies years later I found my 'Add Existing Items' (or CTL-D) in the project menu. It was not found in the Solution Explorer window in Visual Basic Express.

    Also If your intention is to replace a blank form with this as your start-up. (As was my case through a project page mishap.) Once you perform the copy then use the solution explorer to visit (double left click)  the My Project page (or whatever you have named it.) And drop-down the 'Startup Form:' to select you form you have copied in.

    Once you tested your start-up in a debug run you might feel safe to delete the blank form from Solution Explorer. (debug saves your project temporally so run it again or perform a save all from the file menu to make sure the blank form is gone for good. The Debugger grumbled once still looking for Form1 so with a find (Ctl-F) I located those by searching all of My Project and found 2 which I changed to my new form name.  Seems awkward but did save me time.  

    At the risk of over answering I would like to add I have Moved  all (with Ctl-A) or some (Ctl-LeftClick) then copy (Ctl-C) to the clipboard in one open project CLOSE THE PROJECT  and pasted them into a

    form in another  project I OPENED (Not using the Clipboard between of course) . This will bring across the objects and designer properties

    and if your clever you can bring the code for those object's handlers in a similar manner. I have merged functionality of different forms in and out of project this way. 

    (Just wait a few years for the best answer, and I just violated my best rule of no long answers on the web.)

    Regards

    RobotCEO

     




    • Edited by RobotCEO Thursday, October 13, 2011 1:41 AM New Info after post
    Wednesday, October 12, 2011 11:12 PM
  • hi...guys... i did "Right Click your Project name in Solution Explorer | Select Add Existing Item | Browse to your Old project Folder from where you want to copy form | Select form.vb file | Click Add
    Or You can even Drag the Form.vb file to your Solution Explorer and Drop in project " but what i just get is the code of the form and a blank form design... how is it posible to see the design of the form as well??  thank you...
    Tuesday, September 10, 2013 10:22 AM
  • hey regel !

    I think you need to include form.designer.vb as well.


    Thanks

    Living on Earth may be expensive, but did you know that it includes a free trip around the sun? Isn't that worth it?

    Wednesday, September 11, 2013 10:02 AM