I am trying to use the Process class to launch a program, and it is working fine, except I cannot hide the window. I'm guessing it's because it's a command line program, but I don't like a blank black cmd window popping up for a second while the external program is doing its work. I am using the following code:
VB Code:
  1. Process snmp = new Process()
  2.             ProcessStartInfo psi = new ProcessStartInfo()
  3.  
  4.             psi.FileName = "snmpwalk.exe"
  5.             psi.Arguments = txtQuery.Text
  6.             psi.UseShellExecute = false
  7.             psi.RedirectStandardOutput = true
  8.             psi.WindowStyle = ProcessWindowStyle.Hidden
  9.             snmp.StartInfo = psi
  10.             snmp.Start()
  11.             this.BringToFront() 'thought this would bring my app in front of the window, but nope!
  12.             snmp.WaitForExit(500)
  13.             txtResult.Text = txtResult.Text + snmp.StandardOutput.ReadToEnd()

Anyone have any ideas about how I can hide the window?