Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

How to make Web browser?

Mathan_26Mathan_26 Tamilnadu, India Member Posts: 1

Hi everyone I plan to Web browser using. Net. So what are all the things I need to learn and any suggestions to add new features.
. Net is good platform or other languages I need to learn..

Tagged:

Comments

  • Priyasha SarmahPriyasha Sarmah Member Posts: 14

    After adding a WebBrowser we are able to access it’s class methods, which includes a search method and many more.
    1.Setting Up

    If you have not done so already, set up a project using a windows form application. Open visual studio and click File > New > Project. Expand Other Languages > Visual Basic and click on Windows. Select Windows Forms Application and name it Web Browser. Click OK.

    2.Step One

    We will add a tool strip item that conveniently places items that we need in a browser at the top of the form. Expand the ‘Toolbox’ panel and find the ToolStrip item. Drag it onto the from and it will automatically wrap itself at the top of the form. Most popular browsers today have buttons at the top of the form, and this browser will be no different. Now again in the Toolbox panel, look for the WebBrowser item and place it in the form.

    1. Step Two

    Now we need to add the tools for the web browser. we can do this via the tool strip we added on the form. Click on the tool strip at the top to focus it and click on the drop down list and select TextBox. This text box will be used to enter a URL of a web site, basically the address bar. In its property window, change the ‘(Name)’ to txtUrl.

    4.Step Three

    Now that we have the buttons and layout of the browser, we can start adding code that takes advantage of the WebBrowser class methods. Double click on the ‘GO’ button to open Form1.vb. Type in WebBrowser1.Navigate(txtUrl.Text) inside the ‘Private Sub btnGo_Click’ event handler.

    Go back to Form1′s design and double click on the ‘STOP’ button. Inside the ‘Private Sub btnStop_Click’ event handler, insert WebBrowser1.Stop().

    Repeat one more time but this time for the ‘REFRESH’ button. Inside the ‘Private Sub btnRefresh_Click’ event handler insert WebBrowser1.Refresh().

    For help, visit this link:
    http://knowledgetpoint.com/csharp/introduction-c-sharp-programming-language/

Sign In or Register to comment.