图片附件: 游客没有浏览图片的权限,请
登录 或
注册
图片附件: 游客没有浏览图片的权限,请
登录 或
注册
图片附件: 游客没有浏览图片的权限,请
登录 或
注册
*thisform.image2.init
this.Top =thisform.image1.Top-this.Height-5
this.Left =thisform.image1.Left -this.Width -5
*thisform.timer1.init
this.Enabled =.t.
this.Interval =10
this.Tag ="向右"
*thisform.timer1.timer
DO CASE
CASE this.Tag="向右"
thisform.image2.Left = thisform.image2.Left + 1
IF thisform.image2.Left >= thisform.image1.Left + thisform.image1.Width
+ 5
thisform.image2.Left = thisform.image1.Left + thisform.image1.Width
+ 5
this.Tag="向下"
ENDIF
CASE this.Tag="向下"
thisform.image2.Top = thisform.image2.Top + 1
IF thisform.image2.Top >= thisform.image1.Top + thisform.image1.Height + 5
thisform.image2.Top = thisform.image1.Top + thisform.image1.Height + 5
this.Tag="向左"
ENDIF
CASE this.Tag="向左"
thisform.image2.Left = thisform.image2.Left - 1
IF thisform.image2.Left <= thisform.image1.Left - thisform.image2.Width - 5
thisform.image2.Left = thisform.image1.Left - thisform.image2.Width - 5
this.Tag="向上"
ENDIF
CASE this.Tag="向上"
thisform.image2.Top = thisform.image2.Top - 1
IF thisform.image2.Top <= thisform.image1.Top - thisform.image2.Height - 5
thisform.image2.Top = thisform.image1.Top - thisform.image2.Height - 5
this.Tag="向右"
ENDIF
ENDCASE
[此贴子已经被作者于2016-6-21 12:07编辑过]