Results 1 to 7 of 7

Thread: How can I add a form to my project. The form is in another test project?

  1. #1

    Thread Starter
    Member
    Join Date
    Aug 2010
    Location
    North St Paul, Minnesota
    Posts
    38

    How can I add a form to my project. The form is in another test project?

    Using VB6 in Windows 10.
    I made a small test project to develop an MSchart control. Now, how can I get the form into my main project. I tried various ways and they didn't work.

    I get the message:
    "Conflicting names were found in 'C:\...\frmDRChart,frm' The name frmDRChart will be used."

    The form/Chart seems to run properly - except for that message. I prefer that the final name of the form to be frmDRchart.

    Current names:
    When I double click frmDRchart(frmDRchart.frm) in the Project Explorer window, a form with caption "TP414 - frmDRchart(Form)" opens with another form in it with caption=DRChart. DRChart is the form containing MSChart1.

    Related files currently in the project's folder are frmDRchart.frm and frmDRchart.frx
    Last edited by StanH; Mar 6th, 2021 at 03:34 AM.

  2. #2
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,123

    Re: How can I add a form to my project. The form is in another test project?

    I just copy the form (frm and frx) from the source folder to the destination folder then just add it as an existing item. You could try removing the form first from your destination project, delete all relevant files from the folder then do the copy as I am doing. You could also just rename it first in your test project before copying it, but be sure to also "Save As" it to the new name before copying.
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  3. #3
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,126

    Re: How can I add a form to my project. The form is in another test project?

    I agree with dee-u about how to get a existing form from another project into your project...very easy (I do it a lot). BUT, what it appears is that you have already accomplished the copying/adding part, but what intrigues me is that you say the project runs fine except for that message. How about zipping and uploading your 'new' project so I can take a look at what is going on? (don't include any .exe files in the zip).

    Sam
    Sam I am (as well as Confused at times).

  4. #4

    Thread Starter
    Member
    Join Date
    Aug 2010
    Location
    North St Paul, Minnesota
    Posts
    38

    Resolved Re: How can I add a form to my project. The form is in another test project?

    Sam: The original problem seems to be unrepeatable because I can't remember how I made it happen, so I can't send a copy of the problem.

    Dee-u, Thanks - Success: Here is exactly what worked.

    1 I selected the existing bad form "frmDRchart" in Project Explorer, right clicked, removed
    2 Deleted that form's frm and frx files from main project folder
    3 In the test folder, renamed the test form1, saved as frmDRchart.frm.
    4 Copied that (.frm & .frx) into the main project folder.
    5 The firm still had the caption Form1, which I changed to frmDRchart.
    6 Selected in Project Explorer forms, Add, Add File "frmDRchart.frm".
    7 Saved project.
    Last edited by StanH; Mar 7th, 2021 at 02:27 PM.

  5. #5
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,522

    Re: How can I add a form to my project. The form is in another test project?

    right clicked, removed
    And that's where you turned left instead of right... All that did was remove it from the project... NOT from the folder. So when you then try to add the new one, and the IDE copies it over, it sees there is one there already... so it tries to give it a new name. You need to actually DELETE the old form first. Not simply remove it. But delete it.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  6. #6
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,123

    Re: How can I add a form to my project. The form is in another test project?

    Quote Originally Posted by techgnome View Post
    And that's where you turned left instead of right... All that did was remove it from the project... NOT from the folder. So when you then try to add the new one, and the IDE copies it over, it sees there is one there already... so it tries to give it a new name. You need to actually DELETE the old form first. Not simply remove it. But delete it.

    -tg
    The OP did that in his step 2, or did I miss something?
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  7. #7
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,522

    Re: How can I add a form to my project. The form is in another test project?

    Nope, apparently I did...

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width