Copying a form 
Author Message
 Copying a form

I am trying to add a form from a project I got in a VB reference book, to a
project of mine and it doesn't seem to want to do it.  I thought maybe you
could offer some advice.  The form I am trying to add contains a "Rich Text
Box" control and some command buttons.  The project I am adding to is a
32-bit VB 4.0 project and the form I am borrowing runs fine in running it with
its original project.

I open up the project I want to add the form to, and choose Insert/Form from
the menu.  After the form comes up I shoos File/Save As from the menu and
enter the name of the form I want to add to the project (ie. "FORMSS.FRM").  
Then, I close down VB 4.0 and copy the FORMSS.FRM and FORMSS.FRX to my
project file's directory, overwriting the FORMSS.FRM  that I just created.

Then I run the form and get the error message telling me:
"Errors during load.  Refer to 'C:\TEMP\FORMSS.LOG' for details"
As a result, the FORMSS form is not added to my project list in my project.  
When I check out the text in the FORMSS.LOG file I find the following solitary
line:
" Line 2: The Form or MDIForm name frmComments is already in use; cannot
load this form."

Is this a bad procedure for adding a form to a project?  What am I doing
wrong here?

Scott Schuman


http:/www.execpc.com/~intelsys



Sun, 26 Dec 1999 03:00:00 GMT  
 Copying a form

Open you original project, make sure that you don't have a form already =
named frmComments in this project, then from the File menu, select Add =
file, navigate to the formss.frm file, and select it.  once loaded, =
select that file in the projects window, and SaveAs to place it into the =
same folder as your basic project.

If you have a frmComments currently, either rename it, or temporarily =
remove it from the project while you load, then rename formss.frm.

There is no need to do the convoluted method you are using of adding a =
form, saving, and copying.

Note: Before adding the form to the project, make sure that the RTF OCX =
is included in your custom controls selection, to avoid more errors.

--=20
Randy Birch, MVP Visual Basic

Moderator, Fidonet Visual Basic Programmer's Conference
VBnet, The Visual Basic Developers Resource Centre
http://home.sprynet.com/sprynet/rasanen/
=20



: I am trying to add a form from a project I got in a VB reference book, =
to a=20
: project of mine and it doesn't seem to want to do it.  I thought maybe =
you=20
: could offer some advice.  The form I am trying to add contains a "Rich =
Text=20
: Box" control and some command buttons.  The project I am adding to is =
a=20
: 32-bit VB 4.0 project and the form I am borrowing runs fine in running =
it with=20
: its original project.
:=20
: I open up the project I want to add the form to, and choose =
Insert/Form from=20
: the menu.  After the form comes up I shoos File/Save As from the menu =
and=20
: enter the name of the form I want to add to the project (ie. =
"FORMSS.FRM"). =20
: Then, I close down VB 4.0 and copy the FORMSS.FRM and FORMSS.FRX to my =

: project file's directory, overwriting the FORMSS.FRM  that I just =
created.
:=20
: Then I run the form and get the error message telling me:
: "Errors during load.  Refer to 'C:\TEMP\FORMSS.LOG' for details"
: As a result, the FORMSS form is not added to my project list in my =
project. =20
: When I check out the text in the FORMSS.LOG file I find the following =
solitary=20
: line:
: " Line 2: The Form or MDIForm name frmComments is already in use; =
cannot=20
: load this form."
:=20
: Is this a bad procedure for adding a form to a project?  What am I =
doing=20
: wrong here?
:=20
: Scott Schuman


: http:/www.execpc.com/~intelsys
:=20
:=20
:



Sun, 26 Dec 1999 03:00:00 GMT  
 
 [ 2 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. Copy a form

11. copying Access forms to VB

12. Copying a Form at Runtime

 

 
Powered by phpBB® Forum Software