如体~~~
如何实现控件在窗体上的漂浮效果?就像这里面的!!!
Option Explicit
Private motion As Integer 谁能告诉我前两句是什么意思啊!
Private Sub Form_Load()
motion = 1
End Sub
Private Sub Timer1_Timer()
Select Case motion
Case 1
Shape1.Move Shape1.Left - 20, Shape1.Top - 20 这个是什么意思啊~~
If Shape1.Left <= 0 Then
motion = 2
ElseIf Shape1.Top <= 0 Then
motion = 4
End If
Case 2
Shape1.Move Shape1.Left + 20, Shape1.Top - 20
If Shape1.Left >= Me.Width - Shape1.Width Then
motion = 1
ElseIf Shape1.Top <= 0 Then
motion = 3
End If
Case 3
Shape1.Move Shape1.Left + 20, Shape1.Top + 20
If Shape1.Left >= Me.Width - Shape1.Width Then
motion = 4
ElseIf Shape1.Top >= Me.Height - Shape1.Height - 680 Then
motion = 2
End If
Case 4
Shape1.Move Shape1.Left - 20, Shape1.Top + 20
If Shape1.Left <= 0 Then
motion = 3
ElseIf Shape1.Top >= Me.Height - Shape1.Height - 680 Then
motion = 1
End If
End Select
End Sub
告诉我好吗?
谢谢了 偶是菜鸟~~~~
[此贴子已经被作者于2007-1-4 22:03:44编辑过]