Computing.Net > Forums > Programming > VB6 forms

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

VB6 forms

Reply to Message Icon

Name: hukre
Date: May 28, 2004 at 11:41:56 Pacific
OS: ME
CPU/Ram: 512
Comment:

How can I reuse an existing form to make a new one, didn't find any reference to this in my VB6 books.



Sponsored Link
Ads by Google

Response Number 1
Name: egkenny
Date: May 29, 2004 at 02:30:25 Pacific
Reply:

It depends up what you mean by reuse a form.

If you have a new project and want to use a form from another project:
Copy the form (.frm) file from the old project's folder into the new project's folder
From the menu:
Select Project
Select Add Form
Select Existing
Select the form from the new project's folder

===============================================================

If you an existing form in the project and want to reuse parts of it you can copy the objects from the old form to the new one:

Create new form from the menu:
select Project
select Add
select Open

Copy objects from old form:
Select old form
Select all the components by using Ctrl-A from the keyboard
Select new form
Paste all the components by using Ctrl-V from the keyboard

This only copies the objects not the code. You must copy the code from the old form manually to the new form.


0

Response Number 2
Name: BelAnWel
Date: June 3, 2004 at 12:09:09 Pacific
Reply:

if u want to make a new instance of the form during run time:

dim frmNew as frmOriginal

set frmNew = new frmOriginal
frmNew.show

this code creates a form (frmNew) exactly like the original form (frmOriginal), controls and code.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: VB6 forms

Random colors in VB6 form www.computing.net/answers/programming/random-colors-in-vb6-form/10627.html

VB6 Form Properties changed on XP www.computing.net/answers/programming/vb6-form-properties-changed-on-xp/8997.html

e-mail access 97 report thru vb6 interfa www.computing.net/answers/programming/email-access-97-report-thru-vb6-interfa/1710.html