Results 1 to 5 of 5

Thread: Change Array variable from other class then it's 'creator' [RESOLVED]

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member Bloged's Avatar
    Join Date
    May 2001
    Location
    Rotterdam, The Netherlands
    Posts
    330

    Change Array variable from other class then it's 'creator' [RESOLVED]

    Hi everyone,

    Another question by me !

    Next problem I encounter is this one:
    I create an array of an class, called Pion, like this:
    VB Code:
    1. Friend pioPion(30) As Pion

    And give it it's values like this:
    VB Code:
    1. Private Sub cmdTest_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdTest.Click
    2.         Dim iLoop As Integer
    3.         Dim iX As Integer = 0
    4.         Dim iY As Integer = 0
    5.        
    6.         For iLoop = 0 To 29
    7.             Dim testPion As New Pion(iLoop, 0, "Blue")
    8.             pioPion(iLoop) = testPion
    9.             pioPion(iLoop).SetCoordinates(iX, iY)
    10.             If iX = 9 Then
    11.                 iY += 1
    12.                 iX = 0
    13.             Else
    14.                 iX += 1
    15.             End If
    16.         Next
    17. End Sub

    But i want this not in my frmMain Code but in a other class.... Is this possible? Hope you get what I mean... if not just ask for clarification!

    Grtz,

    Bloged
    Last edited by Bloged; Mar 16th, 2004 at 11:08 AM.

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