
VB 程序 求解 已知picture1的高是4500,宽是7500,让image1在picture1随机移动
timer1已做好PrivateSubTimer1_Timer()VB程序求解已知picture1的高是4500,宽是7500,让image1在picture1里面随机移...
timer1已做好
Private Sub Timer1_Timer()
VB 程序 求解 已知picture1的高是4500,宽是7500,让image1在picture1里面随机移动 展开
Private Sub Timer1_Timer()
VB 程序 求解 已知picture1的高是4500,宽是7500,让image1在picture1里面随机移动 展开
1个回答
展开全部
l=rnd*(4500-image1.width)
t=rnd*(7500-image1.height)
image1.mvoe l,t
t=rnd*(7500-image1.height)
image1.mvoe l,t
追问
不对啊,只能在右边动,甚至还可能超出pictrue1的范围
追答
dim L as integer,T as integer
L=rnd*(picture1.scalewidth-image1.width)
T=rnd*(picture1.scaleheight-image1.height)
image1.move L,T
怎么能超范围呢?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询