Solved

Add existing for to vb6 project

Posted on 2004-09-14
6
207 Views
Last Modified: 2010-05-02
I started a new form (Form2) in my vb project.  This priject is saved in a folder on the desktop.  Now I find that this form is created (exist) in a different folder (the default flder of visual studio).

Being new to vb, I don't know how to bring it to the folder on the desktop.  And, after bringing it to this folder, I would like to save it as a Form3.

I was able to save Form2 (from vb default folder) as Form3 in desktop folder, but I am not ablet to make it show in object browser window along my other forms and modules.

Please give me step-by-step instruction.

Thank you.

Mike
0
Comment
Question by:Mike Eghtebas
6 Comments
 
LVL 3

Expert Comment

by:domj
Comment Utility
All you need to do is import the form into the current project. Can't remember where it is exactly & I'm not near my VS box but try File-->Import. I think you can also right click on the object browser and get in this way...

Dom
0
 
LVL 85

Accepted Solution

by:
Mike Tomlinson earned 500 total points
Comment Utility
The filenames of the forms are irrevelant.

But...you must make sure that the value of the Name property of the form you want to import isnt' already in your project.  So, you may have to either change the name of one of the existing forms in your project, or open the the project containing the form you want to import and change its name.

Then, go to...

Project --> Add Form
    Change to the "Existing" Tab
    Browse to the form file you want to import.
Change the names of your forms to what you want them to be

Regards,

Idle_Mind
   
0
 
LVL 23

Expert Comment

by:Ioannis Paraskevopoulos
Comment Utility
To put your form

Open your project
Select the project menu(it's the third next to files manu) and click "add forms"
A window will come up.
Select the "Existing" tab of the window and browse through your pc to find the form you want.


To save your form

Select your form from the project explorer(the window which shows the forms,modules,projects etc. you are curently using)
Go to files menu and click "Save formX as" (where formX is the form you want to save) and chose where and with what name you want to save it
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 3

Expert Comment

by:sgayatri
Comment Utility
I think your form2 is already added to the project .
So yu must first remove it.

1. Remove form2 from the Project menu
2. Physically copy the form2 from the default vb directory to the folder on the desktop
3. Rename it as you want (like form3 etc.)
4. Do Project >> Addform >> Existing
    select your form3 and add it to your project
5. Save the project

hope the solution is clear
0
 
LVL 10

Expert Comment

by:fds_fatboy
Comment Utility
If sgayatri is correct in the assumption that your form is already in the project then it would be simpler to select your form (Form2) in the project window. From the menu File/Save Form2 As... then use the Save As dialog to browse to your project directory and sav it there.
This will produce a copy of your form in the correct directory and this will be automatically be included in your project. A file Form2 will exist in its original location. You may wish to delete it.
0
 
LVL 33

Author Comment

by:Mike Eghtebas
Comment Utility
Hi  Idle_Mind,

There have been many correct answers but yours was first.  

In all honesty, I tried all of the suggestion given above before posting my question.  Part of your post saying: "But...you must make sure that the value of the Name property of the form you want to import isnt' already in your project." was what made me pay attention to the fact that, in vb, there is a name for object and there is a property name for it.  This was the point I was missing.

Because all these, my thank you goes to all contributed and the points goes to you.

Regards,

Mike
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now