Activity Stream
48,167 MEMBERS
6864 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 8 of 8
  1.     
    #1
    Just Another Coder

    Default [TUT] Simple WebBrowser in C#

    Open Visual Studio or Visual C# which ever one you have In this tut I am using Visual Studio 2010.

    First create a new project and name it whatever you want



    Single click on the Form1 and replace it with any name you want to give to the webbrowser.



    Now add a ToolStrip. ToolStrip is found in the ToolBox in Menu and Toolbars tab.



    Add a WebBrowser into the Form below the tools strip and make it to the size you want, after which the form will look like the one below.



    [slidehttp://lulzimg.com/i13/e8a9fa.png[/slide]

    Time to add some Buttons to the toolbar for the web browser controls. Click on the ToolStrip placed in the form and a little blue box will appear to the left end of the tool strip. Click on the blue box that appears and a picture button will popup and do this for 5 picture boxes and then click on the down arrow and select text box. After this add one more picture box at the end.

    This is how it will look finally



    1 Picture Box - Back
    2 Picture Box - Forward
    3 Picture Box - Home
    4 Picture Box - Stop
    5 Picture Box - Refresh
    6 Picture Box - GO
    TextBox - URL


    Now that the basic things are done with, you should add the corresponding icons to the picture boxes. This can be done by right clicking on the picture box and then Set Image.



    I just added some random icons to this and it will look like the below image



    Now I also wish to change the icon of the browser too I am kinda crazy. So the control is over here. Always remember you should have an .ico file for this.



    So finally, here is the basic look of the web browser we made till now. B)



    Now coming to the controls and the coding part. You may wonder itz gonna be difficult or something but this is the simplest part ever and the most easiest part which u can do in less than five minutes and get the browser on the go

    Double click the back button on the tool strip and add this code.

    Code: 
    webBrowser1.GoBack();
    That does exactly what you would think it does.

    OK double click the forward button on the tool strip and add this code.

    Code: 
    webBrowser1.GoForward();
    Now double click the home button on the tool strip and add this code.

    Code: 
    webBrowser1.GoHome();
    Now double click the stop button on the tool strip and add this code.

    Code: 
    webBrowser1.Stop();
    Then double click the refresh button on the tool strip and add this code.

    Code: 
    webBrowser1.Refresh();
    Now the last thing we need to do is make our address bars text usable for the web browser to navigate with.

    So what we do is add code to our Go button.

    Code: 
    webBrowser1.Navigate(toolStripTextBox1.Text);
    (Don't forget http:// when typing in the address bar)

    That is it. Now the WebBrowser is ready to go. Build it and Use it

    Herz the working one I made along with the tutorial



    This tutorial is completely written by me and the screenshots are from ma pc
    fdls Reviewed by fdls on . [TUT] Simple WebBrowser in C# Open Visual Studio or Visual C# which ever one you have >.< In this tut I am using Visual Studio 2010. First create a new project and name it whatever you want :unsure: http://i.imgur.com/0Yu2j.png Single click on the Form1 and replace it with any name you want to give to the webbrowser. http://i.imgur.com/NES0s.png Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Member
    Website's:
    hotfilezone.org 64kalas.com
    nice share
    thanks

  4.     
    #3
    Member
    good tutorial, however is it not based on ie?
    Please follow signature rules

  5.     
    #4
    Member
    Website's:
    WarezX.info
    Good one.
    Thanks

  6.     
    #5
    Respected Member
    Website's:
    DL4Everything.com Soft2050.in
    Nice Tutorial
    I use this type of webbrowser to visit website like Paypal etc...

    So that if there is any istealer in my pc, it will not got detected.

  7.     
    #6
    Member
    Quote Originally Posted by DeLeTeD View Post
    is it not based on ie?
    Quote Originally Posted by soft2050 View Post
    Nice Tutorial
    I use this type of webbrowser to visit website like Paypal etc...

    So that if there is any istealer in my pc, it will not got detected.
    anything that steals from ie will be able to steal from your web browser made in c# unless you write a full parsing engine, which is unlikely.
    Please follow signature rules

  8.     
    #7
    Banned
    Thanks for this nice tutorial fdls
    Its looks quite easy to do so I have added it to my blog as well

    Here take a look :-

    http://www.blogtheway.com/
    http://www.blogtheway.com/2011/02/ho...bbrowser-in-c/

    Hope you dont mind

  9.     
    #8
    Just Another Coder
    Quote Originally Posted by shubhank008 View Post
    Thanks for this nice tutorial fdls
    Its looks quite easy to do so I have added it to my blog as well

    Here take a look :-

    http://www.blogtheway.com/
    http://www.blogtheway.com/2011/02/ho...bbrowser-in-c/

    Hope you dont mind
    No problem man. I would love to see more people learning from it

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [Hiring] Simple PHP Job
    By Apathetic in forum Completed Transactions
    Replies: 0
    Last Post: 14th Sep 2011, 02:08 AM
  2. i need simple css help
    By chems in forum Web Development Area
    Replies: 5
    Last Post: 3rd Apr 2011, 04:35 AM
  3. [Hiring] $10 simple job :D
    By viruz99 in forum Completed Transactions
    Replies: 8
    Last Post: 28th Nov 2010, 07:22 AM
  4. Something Simple
    By w00ty in forum Graphics Area
    Replies: 0
    Last Post: 14th Jul 2010, 07:58 AM
  5. Its seems so simple ...
    By S?nic in forum IP.Board
    Replies: 8
    Last Post: 20th Sep 2009, 12:42 AM

Tags for this Thread

BE SOCIAL