Create duplicate form in Visual Basic 6.0
vb6
Solution
"Save as" will save the form as the new name AND change the reference in the project to the new form file.
You can either:
- Create form ABC
- Save as ABC.frm
- Change name to XYZ
- Save as XYZ.frm
- Re add ABC.frm to the project
or:
- Create form ABC
- Save as ABC.frm
- Copy ABC.frm to XYZ.frm
- Edit XYZ.frm to use the new name
- Add XYZ.frm to the project
Problem
I have a form (for example, `abc.frm`). I want the duplicate form (for example, `xyz.frm`) of `abc.frm`. I don't want to create it again. So I used the Save As option. But it did not appear in Project Explorer. To solve this I did as follows. - I found xyz.frm in the source folder - Opened it with notepad - Changed form name from abc to xyz But now I can not find the `abc.frm` file in Project Explorer. If Save As is the correct option to create a duplicate form then What is the solution to keep both files?. If not then How do I create duplicate form?