Icek
11-29-2003, 10:53 AM
how to declare a structure/class in vb?
structureIcek 11-29-2003, 10:53 AM how to declare a structure/class in vb? Flyguy 11-29-2003, 10:55 AM Those are two different things. A structure in VB is called a "User Defined Type" A class can be created by adding a class file. Icek 11-29-2003, 11:32 AM Those are two different things. A structure in VB is called a "User Defined Type" A class can be created by adding a class file. ok, but can you give me an example of a declaration of such "user defined type" HiTmAN 11-29-2003, 12:06 PM You declare the type in general declarations: Private Type Cat Name As String Weight As Integer End Type And use it on your form/module: Dim aCat As Cat Dim anotherCat As Cat aCat.Name = "Boots" aCat.Weight = 7 anotherCat.Name = "Bill" anotherCat.Weight = 8 |
EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum