-
Mar 5th, 2021, 09:26 PM
#1
Thread Starter
Member
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.
-
Mar 6th, 2021, 05:30 AM
#2
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.
-
Mar 6th, 2021, 07:54 AM
#3
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).
-
Mar 7th, 2021, 02:11 PM
#4
Thread Starter
Member
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.
-
Mar 8th, 2021, 05:27 PM
#5
Re: How can I add a form to my project. The form is in another test project?
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
-
Mar 8th, 2021, 09:55 PM
#6
Re: How can I add a form to my project. The form is in another test project?
Originally Posted by techgnome
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?
-
Mar 9th, 2021, 07:39 AM
#7
Re: How can I add a form to my project. The form is in another test project?
Nope, apparently I did...
-tg
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|