怎样用VB制作一个和梦幻星空一样的程序

2022-08-18 社会 24阅读
Dim red As Integer
Dim green As Integer
Dim blue As Integer

Private Sub Form_Click()
End
End Sub

Private Sub Timer1_Timer()

Dim x As Integer
Dim y As Integer
Dim i As Integer

Do Until i = 1000
i = i + 1
x = Rnd * ScaleWidth
y = Rnd * ScaleWidth
PSet (x, y), RGB(red, green, blue)
Loop

End Sub

Private Sub Timer2_Timer()

Form1.Cls
red = 255 * Rnd
green = 255 * Rnd
blue = 255 * Rnd
Timer1.Enabled = True

End Sub
声明:你问我答网所有作品(图文、音视频)均由用户自行上传分享,仅供网友学习交流。若您的权利被侵害,请联系fangmu6661024@163.com