Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add a form that is existing to a vb6 project?

Tags:

vb6

I have a form "Search.frm" in my vb6 project. I want to add the same form with a different name "SearchNew.frm". I copied the form "Search.frm" and renamed to "SearchNew.frm" and tried to add to the project. But it is giving me an error "Search.frm will not be loaded. Name is already in use". Can anybody please help? Thank you.

like image 723
Jyina Avatar asked May 26 '11 01:05

Jyina


People also ask

Can we add multiple forms in a VB project?

You cannot add multiple forms in a VB project.

How do I copy a form from one project to another in VB net?

Select Visual Studio menu Project -> Add Existing Item... Then select (browse) in the file dialog the Form. cs (Form = name of the form) you want to add to the project and the form (with all associated files) is (copied and) added to your project.


1 Answers

To summarize the excellent answers and comments above:

  • Renaming the file is not enough, VB6 keeps the forms apart by their Name property.
  • Temporarily change the Name property of the existing Search.frm
  • Add the SearchNew.frm
  • Change the Name property of this form
  • Change the Name property of the original Search.frm back to what it was.
like image 69
Dabblernl Avatar answered Sep 29 '22 11:09

Dabblernl