Winfrom downloads the server image to a local device. Use C # To open the image Fax viewer in windows.

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.