Shell 命令 - 放在前面 [英] Shell Command - Bring to front

查看:34
本文介绍了Shell 命令 - 放在前面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个程序,它运行一个 shell 命令来执行一个持续的 ping,但是当它运行时,它没有把 cmd 窗口带到前面.

I have a program that runs a shell command to do a constant ping, but when its ran, it does not bring the cmd window to front.

这似乎必须有一些我遗漏的小修复.

This seems like it has to have some little fix I am missing.

代码:

Shell("ping " & IPAddy.Text & " -t")

推荐答案

Shell("ping " & IPAddy.Text & " -t", AppWinStyle.NormalFocus)

使用带有参数 AppWinStyle.NormalFocus 的 Style 参数,如上所示

Use the Style parameter with the argument AppWinStyle.NormalFocus as shown above

MSDN:外壳函数:https://msdn.microsoft.com/en-us/library/xe736fyk(v=vs.90).aspx

这篇关于Shell 命令 - 放在前面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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