Solved

Add existing for to vb6 project

Posted on 2004-09-14
6
208 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
ID: 12061579
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
ID: 12061657
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
ID: 12061659
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 3

Expert Comment

by:sgayatri
ID: 12062198
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
ID: 12063050
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
ID: 12069588
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

910 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

25 Experts available now in Live!

Get 1:1 Help Now