VB Check

来源:百度知道 编辑:UC知道 时间:2024/05/17 03:13:28
下面全部勾选后 点击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

我加你 告诉你

Shell 方法在运行后,无法控制程序的行为
可以试着用Do while loop循环,判断当前的任务管理器里有没1.exe,要用到API函数