C# Basic Web Browser (Tut)

Discussion in 'Code Snippets and Tutorials' started by fail, Dec 19, 2008.

  1. fail

    fail Level IV

    Joined:
    Aug 31, 2007
    Messages:
    1,676
    Likes Received:
    32
    Most People Can Probably Already Do This. But For Those Who Can't, Heres How to make a simple Web Browser.

    Form Application
    First Off, create a New Windows Form Application. this Cane Be Dony by going to: File<New Project<Windows Form Application.

    Customise The Size.
    Ok, when you have your form, adjust the size and make it Fairly Big.

    Add The "Button"
    Go To Your tool Box and Click The "Button Tool" Drag the Button to the Top Right. Go Down To Propertis and change the Text To Whatever you please, whether it be Search, Go! or Whatever.

    Text Box :eek:
    Go To Your Toolbox (Again) and Add The Text Box. Make It Long, Slim and line it up with the "Start" Button.

    Web Browser
    Now Go to the bottom of your Tools and add a web Browser. Make the size of the browser To cover up the rest of the screen.

    Putting in Information
    Ok, now you need to insert the all the correct information in the correct places. This is fairly simple, double click the Button you put in. (One You Re-Named)
    You will need to put in this info exactly how it looks:

    Code (Text):
    1. webBrowser1.Navigate(textBox1.Text);
    Test It
    Now click Build and Try it out :) Hope You Enjoy!!
     
  2. maximaneffort

    maximaneffort Newbie

    Joined:
    Dec 5, 2008
    Messages:
    6
    Likes Received:
    0
    thx! that helps alot. can you tell me how to make a cheat program like the ones they have here? i have a good idea for one but dont kno how to make it
     
  3. zav75

    zav75 Level I

    Joined:
    Feb 28, 2007
    Messages:
    76
    Likes Received:
    6
    Location:
    Canada, Province of Québec
    No offence, but this is more how to do a form using dot net. A browser needs some http , sockets and threading knowledge.
     
  4. tharoux

    tharoux Level IV

    Joined:
    Dec 30, 2006
    Messages:
    2,733
    Likes Received:
    126
    Location:
    In front of my PC, Montreal
    First, thanks for the useless comment and the gravedig. This guy atleast tried to show something to the members and although it's no use for me, I'm sure it helped someone.

    Now, using the navigate function from the webbrowser item, you don't need all the "knowledge" you're talking about.
    It's a simple procedure already coded within the WebBrowser object and IMO, does the job as long as you ask simple thing.
    All the coding in this thread is correct and the best thing of all, it's working ;)
     
  5. zav75

    zav75 Level I

    Joined:
    Feb 28, 2007
    Messages:
    76
    Likes Received:
    6
    Location:
    Canada, Province of Québec
    Please remeber the rules for posting.
    And gravedidding is ok in the coding forums.

    I agree, but a real browser does. Firefox has milions of line of code and it require all the "knowledge" I said.

    I agree as long as it's a simple task.
     
  6. tharoux

    tharoux Level IV

    Joined:
    Dec 30, 2006
    Messages:
    2,733
    Likes Received:
    126
    Location:
    In front of my PC, Montreal
    :lol: don't take it that way...
    I said useless simply because your post didn't bring any more information to the initial one...
    I think we all get the fact that writing something like firefox involves more than just a simple procedure. ;)