Dim ptb As WinForm.TextBox = e.Form.Controls("PingTextBox")
Dim str As String = ptb.text
MessageBox.show(str)
Dim p As new Process()
p.StartInfo.FileName = "cmd.exe"
p.StartInfo.UseShellExecute = False '关闭Shell的使用
p.StartInfo.RedirectStandardInput = True '重定向标准输入
p.StartInfo.RedirectStandardOutput = True '重定向标准输出
'p.StartInfo.RedirectStandardError = True '重定向错误输出
'
p.StartInfo.CreateNoWindow = True '设置不显示窗口
p.Start()
p.StandardInput.WriteLine("ping str")
p.StandardInput.WriteLine("exit")
Dim strRst As String = p.StandardOutput.ReadToEnd()
msgbox(strRst)
这里得str 无法转换为IP地址 ping值无法读取 请问如何代入