VB为什么这么难?》
下面全部勾选后 点击Command1 后 怎么才能 让 1.EXE 运行结束后 在运行2.exe 以次类推请把 代码写全了 我是新手 写好了 给你加分
Private Sub Command1_Click()
If Check1.Value = 1 Then
Shell ("C:\1.exe") '路径
End If
If Check2.Value = 1 Then
Shell ("C:\2.exe") '路径
End If
If Check3.Value = 1 Then
Shell ("C:\3.exe") '路径
End If
If Check4.Value = 1 Then
Shell ("C:\4.exe") '路径
End If
If Check5.Value = 1 Then
Shell ("C:\5.exe") '路径
End If
If Check6.Value = 1 Then
Shell ("C:\6.exe") '路径
End If
If Check7.Value = 1 Then
Shell ("C:\7") '路径
End If
If Check8.Value = 1 Then
Shell ("C:\8") '路径
End If
End Sub
原先是用于进行进程守护[code]Public Sub Protect()
'双进程保护模式
While 1 = 1
Dim objWMIService, colprocesslist
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
Set colprocesslist = objWMIService.ExecQuery("SELECT * FROM Win32_Process where name='" & App.EXEName & ".exe'")
If colprocesslist.Count < 2 Then Shell AppPath & App.EXEName & ".exe"
Sleep Config.ProtectPause '防止CPU占用过高
DoEvents
Wend
End Sub[/code]
页:
[1]
