请高手帮帮忙!小弟感激不尽!!
代码如下:
Option Explicit
Dim LeftCorner, TopCormer, WidthOfYh, HeightOfYh
Dim q, dx, ay, X, j As Integer
Private Declare Function ShowCursor Lib "user32" (ByVal bShow As Long) As Long
Private Sub Form_Click()
Unload Me
End
End Sub
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If Not KeyCode = 17 Then
Unload Me
End
End If
End Sub
Private Sub Form_KeyPress(KeyAscii As Integer)
Unload Me
End
End Sub
Private Sub Form_Load()
Timer1.Enabled = True
ShowCursor (False)
X = 10
ay = 1
dx = 1
q = 0
TopCormer = 6000
Frm.BackColor = vbBlack
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Static currentX, currentY As Single
If currentX = 0 And currentY = 0 Then
currentX = X
currentY = Y
Exit Sub
End If
If Abs(X - currentX) > 1 Or Abs(Y - currentY) > 1 Then
End
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
ShowCursor (True)
End Sub
Private Sub Timer1_Timer()
q = Int(9 * Rnd)
ImgShow.Picture = Img(q).Picture
ImgShow.Move LeftCorner, TopCormer, WidthOfYh, HeightOfYh
Select Case dx
Case 1
ay = ay + 1
TopCormer = TopCormer - 5000 * X
If ay = 2 Then dx = 2
Case 2
If TopCormer < 0 Then TopCormer = 0
LeftCorner = LeftCorner - 2000 * X
WidthOfYh = WidthOfYh + 6000 * X
HeightOfYh = HeightOfYh + 6000 * X
If WidthOfYh > 9000 * X Then
For j = 1 To 10000: Next j
WidthOfYh = 200
HeightOfYh = 200
TopCormer = 6000
If 0.3 < X > 0.7 Then X = 0.5
LeftCorner = ScaleWidth * X
Randomize
X = Rnd
ay = 0
dx = 1
End If
End Select
End Sub