dim a as object
dim b as new form1
b.show
......
結構這樣定義
type mySt
a as byte
b as integer
c as long
end type
dim m as mySt
不過要註意,為了實現內存對齊,vb會對結構體在內存中的結構進行調整.譬如上面的mySt在內存中大概是這樣的:
00 00 00 00 00 00 00 00 00 00 00 00
a_ 00 00 00 b_ __ 00 00 c_ __ __ __