VBA使用的Randomize和DoEvents
Randomize
private function getInt()
dim n,m as integer
Randomize
n=1
m=3
getInt=Int((m+1-n)*rnd + n)
end function
DoEvents
dim c as Boolean
private sub gameMain()
while c
Do Until z <> iNew
iNew = getnt
loop
z = iNew
Image1.Picture = LoadPicture(path)
doEvents
Wend
end sub
private sub do()
dim str as String
str = iif(str = "s","L","S")
c = not c
gameMain
end sub