Results 1 to 4 of 4

Thread: Showing multiple forms

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 1999
    Posts
    51
    Here's the deal: I have a form called frmMessage that I am putting into a collection called frmEmessage. Then I show the form that I just put into the collection. The problem is that when the newly added form is shown, it replaces the one before it. In other words, I need to have the forms in the collection that were already shown to stay on the screen. Any ideas?


    Private Sub Command1_Click()
    intemessagecount = intemessagecount + 1
    frmEmessage.Add frmMessage, (Str(intemessagecount))
    frmEmessage(intemessagecount).Show
    End Sub

  2. #2
    Guest
    Same Prob!!!!!!
    Let me know if you find the answer please

    [email protected]

  3. #3
    Guest
    Try this. It will open a new copy of the same Form.

    Code:
    Dim NewForm As New Form1
    NewForm.Show

  4. #4
    Lively Member
    Join Date
    Mar 2000
    Posts
    87
    Yeah create a new instance of the form and show it

    Code:
    Private Sub Command1_Click() 
        Dim frmInstance     As frmMessage
    
        Set frmInstance = New frmMessage
        frmInstance.Show
    End Sub
    Then to make sure you unload them all if you application closes. Loop thru the forms collection.

    Code:
        Dim frmTemp       As Form
    
        For Each frmTemp in Forms
           Unload frmTemp
        Next frmTemp

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