|
-
Jul 1st, 2008, 09:43 AM
#1
Thread Starter
Hyperactive Member
[RESOLVED] Copying and Renaming a Form in vb6
Occasionally, I need to make a copy of an existing form and add it to the same vb6 project. It never seems to work because the form always remembers its original name and the project gives me an error message that says " a form of that name already exists". Can someone please tell me how to accomplish this task. In this case I have a form that contains 75-80 percent of what I need.
-
Jul 1st, 2008, 09:59 AM
#2
Re: Copying and Renaming a Form in vb6
Someone may know a better way but I copy it to a new project, rename it there, then add it back to the project I want with the new name using the existing tab.
-
Jul 1st, 2008, 10:03 AM
#3
Re: Copying and Renaming a Form in vb6
 Originally Posted by TysonLPrice
Someone may know a better way but I copy it to a new project, rename it there, then add it back to the project I want with the new name using the existing tab.
Yep, basically I open a new standard exe, load the file from the main project into it, rename it, do a SaveAs to the main project folder, close the new project, and load the newly saved and newly renamed form copy into my main project.
-
Jul 1st, 2008, 10:46 AM
#4
Re: Copying and Renaming a Form in vb6
I copy the files, rename them.... (both the frm and frx) ... then open the FRM in notepad... find all ocurences of the old name and change them the to the new name....
-tg
-
Jul 1st, 2008, 10:51 AM
#5
Re: Copying and Renaming a Form in vb6
Another way when the form isn't too busy is to add a new form, highlight all the controls by clicking in the top corner, hold the mouse down, and drag the box over all the controls and let go. One of them will be highlighted in blue. Click on that one and then the copy function. That will capture all the controls at once. Then paste them onto the new form and copy and paste all the code from the old one into the new one. Then name it what you want.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|