我有一个程序,它使用shell命令来运行另一个应用程序。 [英] I have a program that uses the shell command to run another application.

查看:166
本文介绍了我有一个程序,它使用shell命令来运行另一个应用程序。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用shell命令运行另一个应用程序的程序。

I have a program that uses the shell command to run another application.

prog_id = Shell("C:\Program Files\Mikroelektronika\mikroProg Suite For PIC\mikroProg Suite For PIC.exe -w -pPIC18LF13K22 -f" + Chr(34) + f + Chr(34), AppWinStyle.NormalFocus, True, 17000)

此命令正常工作,直到程序

This command work correctly until the program

mikroProg Suite For PIC.exe 

有错误,它会生成错误或消息框。 shell命令无法退出程序。如何通过

has an error and it generates an error or message box. The shell command is unable to quit the program. How can I discover if such a dialog or message box is being displayed by the

mikroProg Suite For PIC.exe

程序显示是否显示了这样的对话框或消息框,以及如何重新获得控制权。



感谢您的帮助

program and how can it regain control.

Thank you for your help

推荐答案

最好尽量避免使用任何特定于VB的API。使用.NET BCL和FCL: https:/ /msdn.microsoft.com/en-us/library/system.diagnostics.process.start%28v=vs.110%29.aspx [ ^ ]。



-SA
Better try to avoid using any VB-specific API. Use .NET BCL and FCL: https://msdn.microsoft.com/en-us/library/system.diagnostics.process.start%28v=vs.110%29.aspx[^].

—SA


这篇关于我有一个程序,它使用shell命令来运行另一个应用程序。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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