|
-
Feb 28th, 2007, 09:59 AM
#1
Thread Starter
Lively Member
Copy Form to another project
Hi Everybody,
I seem to be stumped. I want to copy a form from one project to another different project.
I can move the *.frm and *.frx files to the new project directory, but it will not appear in the Project Explorer.
What must I do. I don't believe I need to redraw the form... there must be a way to export it to the new project.
Thank,s
Paul
-
Feb 28th, 2007, 10:01 AM
#2
Frenzied Member
Re: Copy Form to another project
You have to import the .frm file. On the right of your screen in the project explorer window right click and choose add.
-
Feb 28th, 2007, 10:01 AM
#3
Re: Copy Form to another project
You have to do Project/Add Form/Existing and then select it. Then it will become a part of your project and show up in the Project Explorer.
-
Feb 28th, 2007, 10:02 AM
#4
Frenzied Member
Re: Copy Form to another project
Yeah Hack's way is easier... just posted what I am used to doing.
-
Feb 28th, 2007, 10:04 AM
#5
Re: Copy Form to another project
 Originally Posted by Besoup
Yeah Hack's way is easier... just posted what I am used to doing. 
Actually, I think your way is easier....it is less clicking. 
It is just that using the IDE menu is the way I'm used to doing it.
-
Feb 28th, 2007, 10:15 AM
#6
Thread Starter
Lively Member
Re: Copy Form to another project
Thanks Besoup and Hack...
You've saved what little hair I have left after this. I knew it had to be simple, but I just didn't "see" it.
Thanks again
Paul
-
May 12th, 2013, 11:01 AM
#7
Re: Copy Form to another project
The solution here, is not working for me.
I have a form in an existing (large) project. It has the IsButton User Control on the form.
http://www.planet-source-code.com/vb...70247&lngWId=1
I have started a new project, with just the default Form.
I have added IsButton.ctl (there is no IsButton.ctx) to the folder (Directory).
I have re-opened the new project and added the IsButon user control to the Toolbox.
I have Used the Project Menu 'Add Form' and browsed to the original large folder to add it's form.
I then get an error, and the button becomes a picturebox.
Line 280: Class Project1.isButton of control isButtonShowDL was not a loaded control class.
Line 288: The property name _ExtentX in isButtonShowDL is invalid.
Line 289: The property name _ExtentY in isButtonShowDL is invalid.
(There are more of those last two lines property errors)
I am old.
Am I confused, or is it not possible to bring the Form across with it's user controls ?
Rob
Last edited by Bobbles; May 12th, 2013 at 10:49 PM.
-
May 12th, 2013, 11:18 AM
#8
Re: Copy Form to another project
Have you tried these alternate steps?
1. Copy the existing Form and IsButton User Control to a new folder.
2. Start new Standard EXE project.
3. Press Ctrl+R to show the Project Explorer window.
4. Drag and drop the Form and IsButton to the Project Explorer window.
On Local Error Resume Next: If Not Empty Is Nothing Then Do While Null: ReDim i(True To False) As Currency: Loop: Else Debug.Assert CCur(CLng(CInt(CBool(False Imp True Xor False Eqv True)))): Stop: On Local Error GoTo 0
Declare Sub CrashVB Lib "msvbvm60" (Optional DontPassMe As Any)
-
May 12th, 2013, 11:33 AM
#9
Re: Copy Form to another project
 Originally Posted by Bonnie West
Have you tried these alternate steps?
1. Copy the existing Form and IsButton User Control to a new folder.
2. Start new Standard EXE project.
3. Press Ctrl+R to show the Project Explorer window.
4. Drag and drop the Form and IsButton to the Project Explorer window.
Thanks for responding Bonnie.
Still getting same error.
My Googling has come up with another hit, where I asked the same question years ago.
I am (still) old, so had forgotten that.
I am re-visiting that thread, and will give it a bash (again apparently)
Regards,
Rob
-
May 12th, 2013, 11:52 AM
#10
Re: Copy Form to another project
Yup the solution given years ago, and forgotten by me, works.
Here is the solution (for future Googlers) -
frmDefaultCancelProps references isButtonTest.isButton - isButtonTest is the library (the Project Name) and isButton is the class.
If you add the user control to a new project the Library changes. It would be something like Project1.isButton
2 choices
1) change the name of your project to isButtonTest
2) change all occurrences of isButtonTest in the frm file (using notepad) to the name of the new project before adding the form to the project.
Last edited by brucevde; Aug 30th, 2006 at 06:50 AM.
Those Canadians are pretty smart
(They also produce great Science Fiction TV shows)
Thanks,
Rob
-
May 12th, 2013, 01:41 PM
#11
Re: Copy Form to another project
It is usually pretty quick to copy the FRM & FRX files to the new Project folder, then open the VBP in that folder and use Add File... to select the Form.
But I agree that any internal UserControl references will require updating of the library qualifier if it isn't the same (Project Title, which defaults to the VBP file's name). And this is best done first, using Notepad or something.
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
|