你首先建一个按钮控件cmd1和一个文本框text1
双击cmd1控件,在代码区输入以下代码:
sub cmd1_click(.....) ‘(双击控件后会自动生成框中内容的)
dim i, sum as single
i=0
for
i=i+1
sum=sum+i
text1.text=sum
next i
end sub
dim sum as integer
for i=1 to 100
sum=sum+i
next
print sum
dim x,c as long
for x=0 to 100
c=c+x
next
到我主页上下载