Runtime Interface
Using system; using system. collections. generic; using system. componentmodel; using system. data; using system. drawing; using system. LINQ; using system. text; using system. windows. forms; namespace windowsformsapplication2 {public partial class form1: FORM {public form1 () {initializecomponent ();} private void button1_click (Object sender, eventargs e) {system. net. webClient WC = new system. net. webClient ();/ /Asynchronous download .. Download Program Stored in the program binfile WC. downloadfileasync (New uri ("http: // dl_dir.qq.com/qqfile/QQ/qq2010/qq2010sp3.1.exe"), "qq2010sp3.1.exe"); WC. downloadprogresschanged + = new system. net. downloadprogresschangedeventhandler (wc_downloadprogresschanged); WC. downloadfilecompleted + = new asynccompletedeventhandler (wc_downloadfilecompleted);} void wc_downloadfilecompleted (Object sender, asynccompletedeventargs e) {// throw new Notimplementedexception (); If (MessageBox. Show ("You have downloaded it successfully. Do you want to open the application? "," Prompt ", messageboxbuttons. yesno) = dialogresult. yes) {system. diagnostics. process. start ("qq2010sp3.1.exe"); // start the Downloaded Program this. close ();} else {This. close () ;}} void wc_downloadprogresschanged (Object sender, system. net. downloadprogresschangedeventargs e) {// throw new notimplementedexception (); progressbar1.value = E. progresspercentage; // set the value of progressbar to the download percentage.} This is a simple example of a download program. I didn't write a general method for this product .. can be used to check for updates .. if you are interested, do the following ..