Hi,
need help on a small application i am creating.... i created two classes however when i set them in one form i cant seem to access them in a different one.. experimented a bit... but dont really know how :d
pls helpthat all works... just if i wanna find out what area(1).getdescription in form2.VB Code:
Option Explicit Dim player(5) As New player Dim area(5) As New area Dim base1, base2 As String Public Sub setclass() Set player(1) = New player Set area(1) = New area Set area(2) = New area player(1).SetUp 4,0,0,0,0 area(1).SetUp "player", 1, 0, 0, 0 // each has value reps a different property area(2).SetUp "enemy", 2, 0, 0, 0 End Sub Private Sub Form_Load() base1 = area(1).GetDescription base2 = area(2).GetDescription If base1 <> base2 Then MsgBox "you fight" Else MsgBox "you love each other" End If End Sub
thanks in advance
steve




Reply With Quote