Copy a form 
Author Message
 Copy a form

?Anybody can help me?
In a same project, i want to copy a form with his code, and then give the
copy another name.
?How can i do this?
Thanks for u help


Mon, 12 Apr 2004 22:18:09 GMT  
 Copy a form

In your explorer copy the files FormName.frm & FormName.frx to NewForm.Frm & NewForm.frx, than add NewForm.frm to your project.

--
Dmitry B. Grekov

Military Insurance Company
Moscow, RUSSIA



Mon, 12 Apr 2004 22:57:13 GMT  
 Copy a form
Assuming that Form1 is the old name and NewForm1 is the new name...

One way is to select VB's Save Form1.frm As menu and choose NewForm1 as the
name. Now, there's a Form1 (your original) and a NewForm1 (the new one)..
Then, just select VB's "Project/Add Form", click on the "Existing" tab and
reload Form1 (your original).. You should now have both forms.

Another way (not as easy but still works):
From explorer, ctrl-c / ctrl-v on that form (and .frx file if there) will
create a file called "Copy of formname.frm".. Rename that to what ever you
want (the .frx too), open the form file with Notepad and make the following
changes..

Where it says...
Begin VB.Form Form1
Change that to
Begin VB.Form NewForm1
and, where it says..

Attribute VB_Name = "Form1"
Change that to
Attribute VB_Name = "NewForm1"
and finally, find all occurances of "Form1.frx" and change those to
"NewForm1.frx"

 restart VB (if not already running) and add that newly named form to your
project.


Quote:
> ?Anybody can help me?
> In a same project, i want to copy a form with his code, and then give the
> copy another name.
> ?How can i do this?
> Thanks for u help



Mon, 12 Apr 2004 23:13:30 GMT  
 Copy a form
Slight mod...

Quote:
> One way is to select VB's Save Form1.frm As menu and choose NewForm1 as
the
> name. Now, there's a Form1 (your original) and a NewForm1 (the new one)..

in your source folder.

Quote:
> Then, just select VB's "Project/Add Form", click on the "Existing" tab and
> reload Form1 (your original).. You should now have both forms.



Quote:
> Assuming that Form1 is the old name and NewForm1 is the new name...

> One way is to select VB's Save Form1.frm As menu and choose NewForm1 as
the
> name. Now, there's a Form1 (your original) and a NewForm1 (the new one)..
> Then, just select VB's "Project/Add Form", click on the "Existing" tab and
> reload Form1 (your original).. You should now have both forms.

> Another way (not as easy but still works):
> From explorer, ctrl-c / ctrl-v on that form (and .frx file if there) will
> create a file called "Copy of formname.frm".. Rename that to what ever you
> want (the .frx too), open the form file with Notepad and make the
following
> changes..

> Where it says...
> Begin VB.Form Form1
> Change that to
> Begin VB.Form NewForm1
> and, where it says..

> Attribute VB_Name = "Form1"
> Change that to
> Attribute VB_Name = "NewForm1"
> and finally, find all occurances of "Form1.frx" and change those to
> "NewForm1.frx"

>  restart VB (if not already running) and add that newly named form to your
> project.



> > ?Anybody can help me?
> > In a same project, i want to copy a form with his code, and then give
the
> > copy another name.
> > ?How can i do this?
> > Thanks for u help



Mon, 12 Apr 2004 23:18:08 GMT  
 Copy a form

Thanks Dmitry, but this tips no works. VB6 says:
"Linea 2: el nombre del formulario o del formulario MDI frmControlSalas ya esta en uso. No se puede cargar este formulario."
that means "the name of form is in use. Can load this form"


  In your explorer copy the files FormName.frm & FormName.frx to NewForm.Frm & NewForm.frx, than add NewForm.frm to your project.

  --
  Dmitry B. Grekov

  Military Insurance Company
  Moscow, RUSSIA



Tue, 13 Apr 2004 16:22:33 GMT  
 Copy a form

Copying the .frm and .frx files is not enough
You should edit the content of .frm file with notepad replacing the old name of the form with the new one

try it

  Thanks Dmitry, but this tips no works. VB6 says:
  "Linea 2: el nombre del formulario o del formulario MDI frmControlSalas ya esta en uso. No se puede cargar este formulario."
  that means "the name of form is in use. Can load this form"


    In your explorer copy the files FormName.frm & FormName.frx to NewForm.Frm & NewForm.frx, than add NewForm.frm to your project.

    --
    Dmitry B. Grekov

    Military Insurance Company
    Moscow, RUSSIA



Sun, 18 Apr 2004 21:21:16 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Copy of Form on Local Machine

2. Copy User-Form Entries in Document ?

3. Copy a form

4. copy a form? help

5. Copying a form

6. Copy a form

7. copy a form picture to a word .doc

8. How to copy a form

9. Copying a form to the clipboard at runtime

10. Copying a form

11. copying Access forms to VB

12. Copying a Form at Runtime

 

 
Powered by phpBB® Forum Software