Results 1 to 10 of 10

Thread: [RESOLVED] Adding Multiple forms

  1. #1

    Thread Starter
    Member
    Join Date
    Sep 2006
    Posts
    40

    Resolved [RESOLVED] Adding Multiple forms

    Hi I have to build an App but a lot of the forms are already developed, is there a way that i can add more than one form at a time to my project?

  2. #2
    PowerPoster gavio's Avatar
    Join Date
    Feb 2006
    Location
    GMT+1
    Posts
    4,462

    Re: Adding Multiple forms

    Menu "Project">>"Add Form..." to add a new one, or menu "Project">>"Add file..." to add an already existing one.

    edit: to "duplicate" an already existing form, use this:
    VB Code:
    1. Dim f As New Form1
    2.     f.Show

  3. #3

    Thread Starter
    Member
    Join Date
    Sep 2006
    Posts
    40

    Re: Adding Multiple forms

    More than one form at a time I have to add like 90 froms to a project...

  4. #4
    G&G Moderator chemicalNova's Avatar
    Join Date
    Jun 2002
    Location
    Victoria, Australia
    Posts
    4,246

    Re: Adding Multiple forms

    No there isn't. If the names of the forms are sequential, for example, frmAdd2,frmAdd3,frmAdd4, you could write another program to edit the project file and add each one to it. If not, you're just going to have to add them manually.

    chem

    Visual Studio 6, Visual Studio.NET 2005, MASM

  5. #5
    Just Married shakti5385's Avatar
    Join Date
    Mar 2006
    Location
    Udaipur,Rajasthan(INDIA)
    Posts
    3,747

    Thumbs up Re: Adding Multiple forms

    Quote Originally Posted by Green Africa
    More than one form at a time I have to add like 90 froms to a project...
    I think make two project and make a group of the project, so then it is easy to understand for you.... other may be possible that you will be get confusion in the 90 from management... so you can make two project then you are able to combine them... it is easy for you... it is depend on you and the project condition that how you are managing the project...

  6. #6
    Frenzied Member
    Join Date
    Oct 2003
    Posts
    1,301

    Re: Adding Multiple forms

    What exactly do you want?

    More different forms? Just make them.
    More instances of a particular form at runtime?

    Try:
    VB Code:
    1. Dim x As Form1
    2.  
    3. Private Sub Command1_Click()
    4.     Set x = New Form1
    5.     x.Show
    6. End Sub

  7. #7

    Thread Starter
    Member
    Join Date
    Sep 2006
    Posts
    40

    Re: Adding Multiple forms

    No just building the project and having to add one form at a time if you have like ten forms in a directory it would have been nice to do like a multi select or an import function or someting.

  8. #8
    Frenzied Member
    Join Date
    Oct 2003
    Posts
    1,301

    Re: Adding Multiple forms

    You can drag & drop them into the IDE's project explorer.

  9. #9

    Thread Starter
    Member
    Join Date
    Sep 2006
    Posts
    40

    Re: [RESOLVED] Adding Multiple forms

    Wow just what I was looking for thanks jeroen79

  10. #10
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,691

    Re: Adding Multiple forms

    Just load the project form into Notepad, drop to a cmd window in the directory the forms are in and type dir *.frm > x.txt, load x.txt into Notepad, copy the form file names (using an editor with block copy capability would make this easier) and paste the filenames into the project file. All you need is a bunch of Form= lines (copy 1, paste into each line), with the filename following the =. Shouldn't take you more than 2 minutes.
    The most difficult part of developing a program is understanding the problem.
    The second most difficult part is deciding how you're going to solve the problem.
    Actually writing the program (translating your solution into some computer language) is the easiest part.

    Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.

    Please Help Us To Save Ana

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width