What's after Process.start ?

ALX

Well-known member
Joined
Nov 16, 2005
Messages
253
Location
Columbia, SC
Programming Experience
10+
I'm working towards including a procedure in a program that allows the user to update a particular file that is required by the program. I'd like it to connect to the internet, and download a file from a particular site. I'm looking at using "Process.Start()" to initiate the connection on the internet via the users default browser ... and "WebClient.DownloadFile" to do the deed. The issue I'm confused about is... I need to wait until the internet connection is setup before running "WebClient.DownloadFile". Obviously, I can't use Process.WaitForExit Method().... ??? Is there a property or something that I can query to find out when the connection is successful ?
??? ... Am I even close to doing this correctly ?.. Any guidance is greatly appreciated.
 
So you're using the Browser to obtain the url of the file to download?
Maybe you should use the WebBrowser control. If you're using .NET 1.X (as your Primary Platform currently states) it's an ActiveX control you can add in the normal way. For V2 there a new WebBrowser control that is part of the framework. Both have an event that fires when a file is downloaded.
There's a good discussion of the WebBrowser here: Events/Custom Events
 
Back
Top