Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create duplicate form in Visual Basic 6.0

Tags:

vb6

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?

like image 790
Himanshu Jansari Avatar asked Jun 27 '12 08:06

Himanshu Jansari


People also ask

How to duplicate a form in windows forms?

Press "Ctrl" and drag your mouse to duplicate a existing form class file. Then exlude the existing form class file from the project. Rename the new form class file.


1 Answers

"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:

  1. Create form ABC
  2. Save as ABC.frm
  3. Change name to XYZ
  4. Save as XYZ.frm
  5. Re add ABC.frm to the project

or:

  1. Create form ABC
  2. Save as ABC.frm
  3. Copy ABC.frm to XYZ.frm
  4. Edit XYZ.frm to use the new name
  5. Add XYZ.frm to the project
like image 102
Deanna Avatar answered Sep 28 '22 09:09

Deanna