Visual Basic是否具有C系统命令的等效项. [英] Does Visual Basic have the equivalent of the C system command.

查看:108
本文介绍了Visual Basic是否具有C系统命令的等效项.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要从VB程序中启动另一个可执行文件.该程序退出后,我的VB程序将继续.

I need to start another executable from within a VB program . After this program exits, my VB program will continue.

推荐答案

请查看此 ^ ].我不确定是否可以使用其他方法.
Look at this article[^]. I am not sure if you can do it differently.


Dim wshShell
Set wshShell = CreateObject("WScript.Shell")
wshShell.Run "notepad.exe", 1, True    'Waits here until the program is closed
Set wshShell = Nothing



使用此功能之前,必须在项目中添加对"Microsoft Scripting Runtime"的引用.



Before you can use this, you must add a reference to "Microsoft Scripting Runtime" to your project.


这篇关于Visual Basic是否具有C系统命令的等效项.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆