用vb运行其他程序的源代码

来源:百度知道 编辑:UC知道 时间:2024/05/17 03:13:41
点击vb后,就会运行C盘根目录的1.exe
代码该如何写?
要完整的代码..

Private Sub Form_Load()
On error GoTo err
Shell "C:\1.exe"
err:
MsgBox ("error!",0)
End Sub

Private Sub Command1_Click()
Shell "c:\1.exe"
End Sub

你是想点VB就运行其他程序还是指运行窗体的时候就运行其他程序

Private Sub Command1_Click()
Shell ("c:/1.exe")
End Sub