Hi
What way to copy /clone all properties from a form to other form in same project
tia
Printable View
Hi
What way to copy /clone all properties from a form to other form in same project
tia
Not sure what you are trying to do.
In the IDE ou can make a copy of the form by saving it then renaming it and save as a different filename then add the original to the project.
At run time you can launch a clone of the form by creating a new instance of it
Code:Dim MyNewForm as Form
Set MyNewForm=New MyExistingForm
MyNewForm.Show
Not really a "clone" as such but a new instance of the same Form class. People don't always realize a VB6 Form is both a class and a predeclared instance with the same name assigned to both.
Well you can't copy all properties otherwise you will have naming conflicts
JMS-----Did you try what DM said? I do it all the time in the IDE....as a matter of a fact, I ALSO create a NEW form, copy-paste any or all of the controls to it from the original form, AND IF I WANT, I copy/paste the associated code as well (making changes a necessary for the 2nd form name vice the original.
I also copy a form using windows explorer from one project to another (brings in all contols and code, of course).
The question is Copy all properties from Form to other Form so I assume OP means the properties of the Form which includes the name of the Form
A S S U M E. I didn't make THAT assumption (the name of the form)! :eek:
OP....you satisfied with DM's response(s)?
Sammi
Well the name of course must be different as there can not be two with the same name plus there would be no point in having the second form anyway if it had the same name there would be no way to identify it from the other one assuming of course the IDE would let you do it in the first place.
In any case it is hard to say for sure what the OP is really wanting to do, maybe the question has been answered and maybe not.
Because as DM points out, common sense would tell us (trying to help OP) that you can't have two identically named forms, like you can't have two buttons named Command1 on the same form.
I assumed that the OP was asking about copying a form with all of its controls but we'll see, I suppose!
I also assume that but my statement was based entirely on what OP said, common sense or not.