24h購物| | PChome| 登入
2005-01-26 17:15:33| 人氣38| 回應0 | 上一篇 | 下一篇

呼呼~

推薦 0 收藏 0 轉貼0 訂閱站台

Dim moveway As String

Private Sub cmdD_Click()
Timer1.Enabled = True
moveway = "Down"
End Sub

Private Sub cmdL_Click()
Timer1.Enabled = True
moveway = "Left"

End Sub

Private Sub cmdLD_Click()
Timer1.Enabled = True
moveway = "LeftDown"

End Sub

Private Sub cmdLU_Click()
Timer1.Enabled = True
moveway = "LeftUp"

End Sub

Private Sub cmdR_Click()
Timer1.Enabled = True
moveway = "Right"

End Sub

Private Sub cmdRD_Click()
Timer1.Enabled = True
moveway = "RightDown"

End Sub

Private Sub cmdRU_Click()
Timer1.Enabled = True
moveway = "RightUp"

End Sub

Private Sub cmdStop_Click()
Timer1.Enabled = False

End Sub

Private Sub cmdU_Click()
Timer1.Enabled = True
moveway = "Up"

End Sub

Private Sub Form_Load()
Timer1.Enabled = True
Timer1.Interval = 50
picball.Picture = LoadPicture("D:ball.wmf")


End Sub

Private Sub hsbcontrol_Change()
Timer1.Interval = hsbcontrol.Value
hsbcontrol.Min = 50
hsbcontrol.Max = 2000
hsbcontrol.SmallChange = 100
End Sub

Private Sub Timer1_Timer()
Select Case moveway
Case "Up"
picball.Top = picball.Top - 50
Case "Down"
picball.Top = picball.Top + 50
Case "Left"
picball.Left = picball.Left - 50
Case "Right"
picball.Left = picball.Left + 50
Case "RightUp"
picball.Top = picball.Top - 50
picball.Left = picball.Left + 50
Case "RightDown"
picball.Top = picball.Top + 50
picball.Left = picball.Left + 50
Case "LeftUp"
picball.Top = picball.Top - 50
picball.Left = picball.Left - 50
Case "LeftDown"
picball.Top = picball.Top + 50
picball.Left = picball.Left - 50
End Select
End Sub

台長: 酷仔♫° 瘋 
人氣(38) | 回應(0)| 推薦 (0)| 收藏 (0)| 轉寄
全站分類: 工作甘苦(工作心得、創業、求職)

是 (若未登入"個人新聞台帳號"則看不到回覆唷!)
* 請輸入識別碼:
請輸入圖片中算式的結果(可能為0) 
(有*為必填)
TOP
詳全文