在窗口的单击事件中写入代码,然后运行程序单击窗口则可实现窗口的抖动
Integer recordx,recordy,i,fw
recordx = this.x//保存原来窗体左上角的X坐标
recordy = this.y//保存原来窗体左上角的Y坐标
Randomize(0)
fw = 10
for i=0 to 100
this.x = this.x + fw
this.y = this.y - fw
this.x = this.x - fw * 2
this.y = this.y + fw * 2
this.x = this.x + fw * 2
this.y = this.y - fw
this.x = this.x - fw
this.y = this.y - fw / 2 //按照分析,应该不需要这一句的,但不知为啥,写这一句,才对齐
this.x = recordx
this.y = recordy
next
阅读(694) | 评论(0) | 转发(0) |