vb程序设计!!!急求~~~

开发编程  |  电脑网络

我想设计一个VB背景,要求界面上出现50个左右的小圆,然后能够追踪鼠标的移动……就是鼠标往哪动,那些小圆也去哪,高手拜托了……
分享:
2014-10-06

2014-10-06最佳答案

Dim xx(50), yy(50), ra(50) As SingleDim col(50) As LongPrivate Sub Form_Load()Dim iRandomizeFor i = 1 To 50xx(i) = Rnd * 800 - Rnd * 800yy(i) = Rnd * 800 - Rnd * 800ra(i) = Rnd * 200col(i) = QBColor(Int(Rnd * 13) + 1)Next iEnd SubPrivate Sub Form_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)Dim iClsFor i = 1 To 50Circle (x + xx(i), y + yy(i)), ra(i), col(i)Next iEnd Sub

其它2条答案

| 3

2014-10-06

用gif动画图片实现“50个左右的小圆”,然后让图片坐标随鼠标移动。如果有问题可以帮你做。

2014-10-06