C # WM development call Method for displaying web pages

Source: Internet
Author: User

When we use C # For WM development, we sometimes need to display webpages

I have summarized two methods:

1. webbrowser Control

2. processstartinfo Process

1. The webbrowser control can be nested in a webpage.

Add the control webbrowser to the winform form. Find the property and enter the URL to display the webpage.

If you want to use address resources, you need to know too much. We will continue our discussion in our future blog posts.

2. Method 1:

Processstartinfo PS =NewProcessstartinfo ();
PS. filename =Http://www.it100.info";
Process. Start (PS );

Used to start the default browser.
 
Method 2: process. Start ("Browser file name", address );

Used to start a specific Browser

If you have any comments or suggestions, you can leave a message for me.

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.