Timer1.Enabled = True
Timer1.Interval = 1000
Dim pic(3) As String
pic(0) = "C:\1.JPG" '春季
pic(1) = "C:\2.JPG" '夏季
pic(2) = "嫌塌差C:\3.JPG" '秋芹皮季
pic(3) = "C:\4.JPG" '衫哗冬季
End Sub
Private Sub Timer1_Timer()
If Picture1.Picture = pic(0) Then
Picture1.Picture = pic(1)
End If
If Picture1.Picture = pic(1) Then
Picture1.Picture = pic(2)
End If
If Picture1.Picture = pic(2) Then
Picture1.Picture = pic(3)
End If
If Picture1.Picture = pic(3) Then
Picture1.Picture = pic(4)
End If
If Picture1.Picture = pic(4) Then
Picture1.Picture = pic(0)
End If
End Sub
'万花筒程序'粘贴下面代码即可, 不用添加任何控件
Private WithEvents Timer1 As Timer
Dim r&, r1&, t&, a1!, a2!, xb!, yb!, s!, b#
Private Sub Form_Load()
Me.Width = 4500: Me.Height = 4500
Me.Move (Screen.Width - Me.Width) \ 2, (Screen.Height - Me.Height) \ 2
Me.AutoRedraw = True
Me.Caption = "CBM666的万花筒"
Set Timer1 = Controls.Add("vb.timer", "Timer1")
Timer1.Interval = 10
End Sub
Private Sub Timer1_Timer()
Randomize
r = 340 * Rnd
If r <> 0 Then
r1 = 500
s = r * Rnd
b = RGB(256 * Rnd, 256 * Rnd, 256 * Rnd)
For t = 1 To 10000
a1 = t * 3.1415926 / 180
a2 = (r1 / r) * a1
xb 局桐= 500 + (-(r1 - r) * Cos(a1) - s * Cos(a2 - a1) + 420) * 4
卖腊谨yb = 500 + ((r1 - r) * Sin(a1) - s * Sin(a2 - a1) + 380) * 4
Me.PSet (xb, yb), 中基b
Next t
End If
End Sub
Private Sub Form_Click()Form1.picture = app.path & "\夏.jpg".
Form1.ForeColor=RGB(255,0,0)
Print "绿树荫御悔浓夏日饥唤长"
End Sub
Private Sub Form_DblClick()
Form1.picture = app.path &烂拆凯 "\秋.jpg".
Form1.ForeColor=RGB(0,0,255)
Print "秋风萧瑟天气凉"
End Sub
Private Sub Command1_Click()
Form1.picture = app.path & "\冬.jpg".
Form1.ForeColor=RGB(0,0,0)
Print "千里冰封万里雪飘"
End Sub
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)