跪求VB 6.0编写的一个小程序.附带代码.在线等~~
3个回答
展开全部
写入下列代码看看
Dim x As Integer
Dim y As Integer
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case 37
x = x - 50
Case 38
y = y - 50
Case 39
x = x + 50
Case 40
y = y + 50
End Select
Me.Circle (x, y), 50
End Sub
Private Sub Form_Load()
x = 500
y = 500
Me.AutoRedraw = True
Me.KeyPreview = True
For i = 0 To 10
Print "方向键控制"
Next i
Me.FillStyle = 0
Me.Circle (x, y), 50
End Sub
Dim x As Integer
Dim y As Integer
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case 37
x = x - 50
Case 38
y = y - 50
Case 39
x = x + 50
Case 40
y = y + 50
End Select
Me.Circle (x, y), 50
End Sub
Private Sub Form_Load()
x = 500
y = 500
Me.AutoRedraw = True
Me.KeyPreview = True
For i = 0 To 10
Print "方向键控制"
Next i
Me.FillStyle = 0
Me.Circle (x, y), 50
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询