
程序代码:
thisform.label1.caption = ""
thisform.label2.caption = ""
FOR i=1 TO thisform.list2 .listcount
IF thisform.list2 .selected(i)
thisform.label1.caption = thisform.label1.caption + thisform.list2.List(i,1)
thisform.label2.caption = TRANSFORM(VAL(thisform.label2.caption) + VAL(thisform.list2.List(i,2)))
ENDIF
ENDFOR