public type dictionary
english as string
chinese as string
end type
private dic() as dictionary
'定义一个字典,然后赋值
private sub form_load
redim dic(10)
dic(0).english="access"
dic(0).chinese="vt. 存取;接近;使用" & vbcrlf & "n. 通路;进入;使用权"
......
for i=0 to 10 '英文部分加入列表框
list1.additem dic(i).english
next
end sub
'点击列表框在文本框出现翻译
private sub list1_click()
text1.text=dic(list1.listindex).chinese
end sub