From: http://blog.csdn.net/destimarve/article/details/3869486
In order to achieve this function today, I have reviewed numerous materials on the Internet, and I don't know how to call it, either VB or. Finally, the answer is found in the example given by msdn.CodeAs follows:
WebClient myclient = new WebClient (); string filename = @ "D: \ a.jpg"; string address = configurationmanager. deleetask[ ""]. tostring (); If (file. exists (filename) {file. delete (filename); myclient. downloadfile ("http://www.baidu.com/img/123.jpg", filename);} else {myclient. downloadfile ("http://www.baidu.com/img/123.jpg", @ "D: \ a.jpg");} // create a new system process system. diagnostics. process Process = new system. Diagnostics. Process (); // set the file name. This is the actual path of the image + file name process. startinfo. filename = filename; // This is the key part. Set the process running parameters. An image is displayed in the maximum window. Process. startinfo. arguments = "rundll32.exe C: // windows // system32 // shimgvw. DLL, imageview_fullscreen "; // whether to use shell to execute the Program . This item can be set because the system defaults to true, however, if this parameter must be set to true process. startinfo. useshellexecute = true; // you can change the display style of the form opened by a process. startinfo. windowstyle = system. diagnostics. processwindowstyle. hidden; process. start (); process. close ();
the final process. you can leave the close () method empty or change it to process. waitforexit () but the latter will pause the program until the opened form is closed.