VB 运行时错误5 无效的过程调用或参数 30
我编了一个程序,以下是代码:PrivateSubCommand1_Click()IfText1.Text="xxThenMsgBox"密码正确,退出!"Timer1.En...
我编了一个程序,以下是代码:
Private Sub Command1_Click()
If Text1.Text = "xxThen
MsgBox "密码正确,退出!"
Timer1.Enabled = False
Form1.Visible = False
Else
MsgBox "密码错误!", vbCritical
End If
End Sub
Private Sub Command2_Click()
Shell App.Path & "\SJ\svchost.exe"
Timer1.Enabled = False
Form1.Visible = False
End Sub
Private Sub Form_Load()
Set w = CreateObject("wscript.shell")
App.TaskVisible = False
App.Title = ""
w.regwrite "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\X", App.Path & "\" & App.EXEName & ".exe"
Open "D:\X\红警2尢里的复仇\YURI.exe" For Binary As #1
Open "F:\地下城与勇士\Uninstall.exe" For Binary As #2
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
Cancel = 2
MsgBox "请填密码!", vbCritical
End Sub
Private Sub Form_Unload(Cancel As Integer)
Cancel = 2
MsgBox "请填密码!", vbCritical
End Sub
Private Sub Timer1_Timer()
SetWindowPos Form1.hwnd, HWND_TOPMOST, 0, 0, 0, 0, Flag
Form1.SetFocus
End Sub
我把进程名改成svchost.exe是为了有人恶意关闭,SetWindowPos已经在模块里声名了,请问为什么在编译环境下不会出现错误,而生成EXE文件就会出现错误呢?
第二行错了 少了 "
oldt888你说循环10次,会出错吗,那为什么启动之后不管等多久都没问题,按下按钮才出错
有神经病 展开
Private Sub Command1_Click()
If Text1.Text = "xxThen
MsgBox "密码正确,退出!"
Timer1.Enabled = False
Form1.Visible = False
Else
MsgBox "密码错误!", vbCritical
End If
End Sub
Private Sub Command2_Click()
Shell App.Path & "\SJ\svchost.exe"
Timer1.Enabled = False
Form1.Visible = False
End Sub
Private Sub Form_Load()
Set w = CreateObject("wscript.shell")
App.TaskVisible = False
App.Title = ""
w.regwrite "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\X", App.Path & "\" & App.EXEName & ".exe"
Open "D:\X\红警2尢里的复仇\YURI.exe" For Binary As #1
Open "F:\地下城与勇士\Uninstall.exe" For Binary As #2
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
Cancel = 2
MsgBox "请填密码!", vbCritical
End Sub
Private Sub Form_Unload(Cancel As Integer)
Cancel = 2
MsgBox "请填密码!", vbCritical
End Sub
Private Sub Timer1_Timer()
SetWindowPos Form1.hwnd, HWND_TOPMOST, 0, 0, 0, 0, Flag
Form1.SetFocus
End Sub
我把进程名改成svchost.exe是为了有人恶意关闭,SetWindowPos已经在模块里声名了,请问为什么在编译环境下不会出现错误,而生成EXE文件就会出现错误呢?
第二行错了 少了 "
oldt888你说循环10次,会出错吗,那为什么启动之后不管等多久都没问题,按下按钮才出错
有神经病 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询