purana你帮我看看下面的程序代码有问题吗?
在模块中声明了findwindow了
Private isrun As Boolean
Private Sub Form_Load()
old = -100
Timer2.Interval = 10
End Sub
Private Sub picBack_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
If y > 8670 And y < 100065 Then
If x > 1000 And x < 2400 Then
shp.Left = 960
Screen.MousePointer = vbHourglass
If isrun = True Then MsgBox ("您已经打开一次了")
isrun = True
shp.BackColor = &HC0FFFF
End If
If x > 3700 And x < 5175 Then
shp.Left = 3810
Screen.MousePointer = vbHourglass
End If
If x > 6570 And x < 9030 Then
shp.Left = 6675
Screen.MousePointer = vbHourglass
End If
If x > 9720 And x < 11310 Then
shp.Left = 9815
Screen.MousePointer = vbHourglass
End If
Else
Screen.MousePointer = 1
End If
End Sub
Private Sub picBack_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
If y > 8670 And y < 100065 Then
If x > 1000 And x < 2400 Then
shp.Left = 960
Screen.MousePointer = vbCustom
Shell App.Path & "\ajr.exe", vbNormalFocus
End If
If x > 3700 And x < 5175 Then
shp.Left = 3810
Screen.MousePointer = vbCustom
Shell App.Path & "\5051.exe", vbNormalFocus
Hook
End If
If x > 6570 And x < 9030 Then
shp.Left = 6675
Screen.MousePointer = vbCustom
Shell App.Path & "\Book.exe", vbNormalFocus
End If
If x > 9720 And x < 11310 Then
shp.Left = 9815
Screen.MousePointer = vbCustom
Shell App.Path & "\Test.exe", vbNormalFocus
End If
Else
Screen.MousePointer = 1
End If
End Sub
Private Sub Timer2_Timer()
Dim isFindHwnd As Long
isFindHwnd = FindWindow(vbNullString, "ajr")
If (isFindHwnd > 0) Then
isrun = True
Else
isrun = False
frmMulti.shp.BackColor = &HFFFFFF
End If
End Sub