怎样在VB中设计背景动画图案

类别:VB语言 点击:0 评论:0 推荐:

窗体布局:

控件:timer1   屬性设置:timer1.Interval=1

代码:

Dim k As Integer
Private Sub Timer1_Timer()
k = k + 20
Line (Me.Width / 2, Me.Height / 2)-(0, k), RGB(0, 0, Abs(255 - k / 24))
Line (Me.Width / 2, Me.Height / 2)-(k, 0), RGB(0, 0, Abs(255 - k / 24))
Line (Me.Width / 2, Me.Height / 2)-(k, 0), RGB(0, 0, Abs(255 - k / 24))
Line (Me.Width / 2, Me.Height / 2)-(Me.Width, k), RGB(0, 0, Abs(255 - k / 24))
Line (Me.Width / 2, Me.Height / 2)-(Me.Width, k), RGB(0, 0, Abs(255 - (Me.Height - k) / 24))
Line (Me.Width / 2, Me.Height / 2)-(k, Me.Height), RGB(0, 0, Abs(255 - k / 24))
Line (Me.Width / 2, Me.Height / 2)-(k, Me.Height), RGB(0, 0, Abs(255 - k / 24))
Line (Me.Width / 2, Me.Height / 2)-(0, k), RGB(0, 0, Abs(255 - (Me.Height - k) / 24))
If k > 12500 Then
Timer1.Enabled = False

end if

End Sub

本文地址:http://com.8s8s.com/it/it6412.htm