Hello. I have two forms. Let's call them form1 and form2. Form1 is a form which controls the meat of my program and runs in the background. Form2 is a popup-like dialog that will pop up when triggered by an event in form1.
I want to call the netstat command from a cmd process. That part is not hard. I have a stream writer piping the commands into the command prompt process, and a stream reader reading back the contents of the window. What I would like to have happen is to have a loop which loops the netstat command. Every time that the contents of the netstat window changes, I would like the output to be displayed in a listbox in form2. So, form2 will only show up when the netstat process spits back new text.
Also, if possible, I would like to have the form2 only display the new information from the netstat command line, and not all of the standard command prompt jargon. I think that I would need to trim the output stream, but I'm not sure. If this isn't possible, that's ok, but I would like to have the form2 monitor the netstat process and popup anytime the text in the netstat window changes. Thanks!!!
P.S. - If you don't know what netstat is, it is a command you run from a command prompt (:cheesy:), which displays all active ports on your computer. To try it, go to a command prompt and type netstat.