`
lovnet
  • 浏览: 6704315 次
  • 性别: Icon_minigender_1
  • 来自: 武汉
文章分类
社区版块
存档分类
最新评论

vb工程21--百例41--五彩碎纸

 
阅读更多

Option Explicit

Private Sub Command1_Click()

End

End Sub

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)

position

Dim XPos, YPos, i定义点的水平和垂直坐标及循环变量i

DrawWidth = 100 设置点的宽度为100

For i = 1 To 10000 循环变量从i从1到10000

XPos = Rnd * ScaleWidth 水平坐标为窗体内部宽度的随机位置

YPos = Rnd * ScaleHeight 垂直坐标为窗体内部宽度的随机位置

PSet (XPos, YPos), QBColor(Rnd * 15) 在窗体上绘制点,颜色是随机的

Next i 下一个循环变量

End Sub

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics