Results 1 to 10 of 10

Thread: really EZ question (that I cant figure out :))

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 2001
    Posts
    148

    really EZ question (that I cant figure out :))

    How do you duplicate a form (make an array)?

  2. #2
    Frenzied Member nishantp's Avatar
    Join Date
    Jan 2001
    Location
    Where you least expect me to be
    Posts
    1,375
    A form array? Never heard of it...what on earth are u trying to do with it?
    You just proved that sig advertisements work.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Sep 2001
    Posts
    148
    Originally posted by nishantp
    A form array? Never heard of it...what on earth are u trying to do with it?
    err...I dont know what its called!!! Ive seen it done all the time..how do I duplicate a form (so it shows up twice on the screen...) I dont know how else to explain it

  4. #4
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923
    You mean this?
    VB Code:
    1. Dim frm As New Form1
    2.  
    3. frm.Show

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Sep 2001
    Posts
    148
    Originally posted by chrisjk
    You mean this?
    VB Code:
    1. Dim frm As New Form1
    2.  
    3. frm.Show
    yup. thanks. I knew there was an easy way to do it.

  6. #6
    Lively Member
    Join Date
    Apr 2001
    Posts
    83

    Talking

    Private Sub Command1_Click()
    Dim blah As New Form1
    blah.Show
    End Sub


  7. #7
    Lively Member
    Join Date
    Apr 2001
    Posts
    83

    :P~

    bah! you beat me too it :P

  8. #8

    Thread Starter
    Addicted Member
    Join Date
    Sep 2001
    Posts
    148
    I am actually suprised forms dont have an index property like everything else in vb... That was my first quess on how you would do it but obviously not

  9. #9
    Frenzied Member Skitchen8's Avatar
    Join Date
    Feb 2001
    Location
    Binghamotn, NY
    Posts
    1,943
    no, no index property as forms are not controls themselves, but a container for controls... and since their not controls it eradicates the idea of a control array.
    Government is another way to say better…than…you.
    It’s like ice but no pick, a murder charge that won’t stick,
    it’s like a whole other world where you can smell the food,
    but you can’t touch the silverware.
    Huh, what luck. Fascism you can vote for.
    Humph, isn’t that sweet?
    And we’re all gonna die some day, because that’s the American way
    -Stone Sour

  10. #10
    Tygur
    Guest
    If you really want the forms in an array, you can make an array of forms:
    Dim MyForms() As Form1

    ..and then just use it like any other array:
    VB Code:
    1. 'Note: this particular bit of code will not work unless
    2. 'the array already has at least one element in it
    3. i = UBound(MyForms) + 1
    4. ReDim Preserve MyForms(i)
    5. Set MyForms(i) = New Form1

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