vfp中如何用时钟控件实现标签的移动?
展开全部
在时钟控件的timer事件中输入以下中基清代码
**向左走卖前
thisform.label1.left=thisform.label1.left-10
if thisform.label1.left+thisform.label1.width<0
thisform.label1.left=thisform.width
endif
**向右走
thisform.label2.left=thisform.label2.left+10
if thisform.label2.left>thisform.width
thisform.label2.left=-thisform.label2.width
endif
**向上走
thisform.label3.top=thisform.label3.top-10
if thisform.label3.top+thisform.label3.height<0
thisform.label3.top=thisform.height
endif
**向锋橡下走
thisform.label4.top=thisform.label4.top+10
if thisform.label4.top>thisform.height
thisform.label4.top=thisform.label4.height
endif
**向左走卖前
thisform.label1.left=thisform.label1.left-10
if thisform.label1.left+thisform.label1.width<0
thisform.label1.left=thisform.width
endif
**向右走
thisform.label2.left=thisform.label2.left+10
if thisform.label2.left>thisform.width
thisform.label2.left=-thisform.label2.width
endif
**向上走
thisform.label3.top=thisform.label3.top-10
if thisform.label3.top+thisform.label3.height<0
thisform.label3.top=thisform.height
endif
**向锋橡下走
thisform.label4.top=thisform.label4.top+10
if thisform.label4.top>thisform.height
thisform.label4.top=thisform.label4.height
endif
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询