How to add a form existing in a vb6 project?

I have the 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 it to "SearchNew.frm" and tried to add it to the project. But this gives me the error "Search.frm will not load. The name is already in use." Can anybody help? Thank.

+5
source share
3 answers

To summarize the excellent answers and comments above:

  • Renaming a file is not enough; VB6 saves the forms separately by the Name property.
  • Temporarily change the Name property of an existing Search.frm
  • Add SearchNew.frm
  • Change the Name property of this view
  • Name Search.frm , .
+4

VB6:

  • .frm ( )
  • ()
  • → Search.frm As...

, :

  • VB6 EXE
  • (Ctrl + T)
  • .frm (Ctrl + D)
  • ()
  • → ...
+2

I wrote VB6 code for a long time, but I'm sure you need to change the Name property of the form, not just the file name, to use it as a separate form.

+1
source

All Articles