CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2000
    Posts
    3

    Creating multiple forms

    Is it possible to create multiple copies of a single form within a visual basic program, like how internet explorer can have a number of processes operating at once? What I mean is that every time you press a button to show a form, it creates a new version of the form. Thanks.


  2. #2
    Join Date
    May 1999
    Location
    Oxford UK
    Posts
    1,459

    Re: Creating multiple forms

    In VB, Forms are treated the same way as a class - you can create instances of forms by using code such as :


    option Explicit
    '
    private Sub Command1_Click()
    Dim fFrm as Form1
    '
    set fFrm = new Form1
    '
    Load fFrm
    '
    fFrm.Show
    '
    End Sub





    Chris Eastwood

    CodeGuru - the website for developers
    http://codeguru.developer.com/vb

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

Featured