Results 1 to 2 of 2

Thread: Problem controling duplicated Forms.

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2001
    Posts
    2

    Problem controling duplicated Forms.

    Is it possible to create an array of forms, the way you would with objects? If so tell me what i am doing wrong:

    for i = 1 to 10
    dim FormX(i) as new form1
    formX(i).show
    next i

    then after the forms are created i want to be able to control them in a loop, without having to control each one seprate:

    for x = 1 to 10
    formX(x).top = 10
    next x

    I'm pretty sure it can be done, im just very confused.

  2. #2
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    declare the array, then load the forms into it

    private FormX(i) as form1
    ...
    for i = 1 to 10
    set formX(i) = new form1
    formX(i).show
    next i
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

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