Results 1 to 3 of 3

Thread: form Array??

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2001
    Location
    shiraz
    Posts
    163

    Question form Array??

    hi guys
    well I wanted to know if I can create an array of forms in my application , just like yahoo messenger When we send private message for each user. Then they have the same window for each user. I checked form properties but I couldn’t find any index property in it. Can anybody help?
    Thanks a lot

  2. #2
    Frenzied Member TomGibbons's Avatar
    Join Date
    Feb 2002
    Location
    San Diego, CA Previous Location: UK
    Posts
    1,345
    Make a new form called form2 (or substitute the name in the code), and use:
    VB Code:
    1. Private Sub Command1_Click()
    2.     Dim fr As New Form2
    3.     fr.Show
    4. End Sub

  3. #3
    Frenzied Member TomGibbons's Avatar
    Join Date
    Feb 2002
    Location
    San Diego, CA Previous Location: UK
    Posts
    1,345
    To close all the forms at the end, use
    VB Code:
    1. Private Sub Form_Unload(Cancel As Integer)
    2. Dim fr As Form
    3.     For Each fr In Forms
    4.         Unload fr
    5.     Next
    6. End Sub
    You might find that useful

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