Solved

Add existing for to vb6 project

Posted on 2004-09-14
6
211 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
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 
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 34

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…

809 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