Geekpedia Tutorials Home

Building a C# Chat Client and Server

Building a C# Chat Client and ServerA step by step tutorial teaching you how to create your own chat client and chat server easily in C#, for local networks or the Internet.

in C# Programming Tutorials

Getting Hard Drive Information

Getting Hard Drive InformationA C# tutorial showing you how to make use of WMI to extract information on disk drives, such as model, capacity, sectors and serial number.

in C# Programming Tutorials

UPS Shipping Calculator

UPS Shipping CalculatorThis tutorial will teach you how to calculate the shipping cost based on the weight, height, length and depth of the box, the distance and the UPS service type.

in PHP Programming Tutorials

Create Your Own Rich Text Editor

Create Your Own Rich Text EditorCreating a Rich Text Editor using JavaScript is easier to do than you might think, thanks to the support of modern browsers; this tutorial will walk you through it.

in JavaScript Programming Tutorials
Search
Tutorials
Programming Tutorials
IT Jobs
From CareerBuilder

Tabbed Web Browser

In this tutorial we will be making a tabbed web browser. I will explain every thing as we go, so I will get the same experience as you all do. I will be making the program as I make the tutorial. I hope that this helps you out and that you like this! It is going to take about one hour if you are typing it in and about 10 minutes if you are copying and pasting.

On Thursday, August 23rd 2007 at 04:50 PM
By VGstudios Owner (View Profile)
*****   (Rated 4.5 with 8 votes)
Contextual Ads
More C# Resources
Advertisement

To start off, we need to add the controls. Add seven buttons named mainTab, newTab, newtab2, tab2, tab3, mainGo, Go2, and Go3 (mainGo, Go2 and Go3 need to be on top of each other) to the top of the Form and three webbrowser controls named Main, Web2, and Web3 (as with the buttons, you must put them one on top of the other). Also you will need to add three textboxes named mainUrl, Url2, and Url3 as shown below (must be one on top of the other).

Tabbed Browser Form

Now we want to change the properties of the textboxes. Change the AutoCompleteMode to SuggestAppend, change the AutoCompleteSource to AllUrl, and change the Modifiers to public (be sure that you change all the text boxes to the properties above.)

Click on the form and click the Events button (the lightning bolt).Now double click the field that says Load and add these lines of code to it:

tab2.Hide();
tab3.Hide();
Url2.Hide();
Url3.Hide();
Go2.Hide();
Go3.Hide();
Web2.Hide();
Web3.Hide();
newtab2.Hide();
newtab3.Hide();

This will make it so that when the program opens it will hide them.

Go to the document outline and click mainGo.

Click the events button and double click the field that says "Click" and add this line of code:

Main.Navigate(mainUrl.Text);

Go to the document outline and click Go2.

Click the events button and double click the field that says "Click" and add this line of code:

Web2.Navigate(Url2.Text);

Go to the document outline and click Go3.

Click the events button and double click the field that says "Click" and add this line of code:

Web3.Navigate(Url3.Text);

Now double click mainTab and add these lines of code:

Web2.Hide();
Web3.Hide();
Main.Show();
Url2.Hide();
Url3.Hide();
Go2.Hide();
Go3.Hide();
mainUrl.Show();
mainGo.Show();

This will make it so that when you click that tab, you will see that tab's web browser.

Double click tab2 and add these lines of code:

Web3.Hide();
Main.Hide();
Url3.Hide();
mainUrl.Hide();
Go3.Hide();
mainGo.Hide();
Web2.Show();
Url2.Show();
Go2.Show();

Double click tab3 and add this line of code:

mainGo.Hide();
Go2.Hide();
mainUrl.Hide();
Url2.Hide();
Web2.Hide();
Main.Hide();
Web3.Show();
Url3.Show();
Go3.Show();

Go to the document outline and click newTab and click the events button. now double click the thing that says "Click" and add this line off code:

newTab.Hide();
newtab2.Show();
Web2.Show();
Main.Hide();
mainUrl.Hide();
Url2.Show();
mainGo.Hide();
Go2.Show();
tab2.Show();

Go to the document outline and click newTab2 and click the events button. now double click the thing that says "Click" and add this line off code:

newtab2.Hide();
Web2.Hide();
Url2.Hide();
Go2.Hide();
tab3.Show();
Go3.Show();
Url3.Show();
Web3.Show();

Thanks for using this tutorial! I hope you liked it! i will make new tutorials as I come up with them! oh yeah and here is the complete code:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace WindowsApplication1
{
   public partial class Form1 : Form
   {
      public Form1()
      {
         InitializeComponent();
      }

      private void Form1_Load(object sender, EventArgs e)
      {
         tab2.Hide();
         tab3.Hide();
         Url2.Hide();
         Url3.Hide();
         Go2.Hide();
         Go3.Hide();
         Web2.Hide();
         Web3.Hide();
         newtab2.Hide();
      }

      private void mainGo_Click(object sender, EventArgs e)
      {
         Main.Navigate(mainUrl.Text);
      }

      private void Go2_Click(object sender, EventArgs e)
      {
         Web2.Navigate(Url2.Text);
      }

      private void Go3_Click(object sender, EventArgs e)
      {
         Web3.Navigate(Url3.Text);
      }

      private void mainTab_Click(object sender, EventArgs e)
      {
         Web2.Hide();
         Web3.Hide();
         Main.Show();
         Url2.Hide();
         Url3.Hide();
         Go2.Hide();
         Go3.Hide();
         mainUrl.Show();
         mainGo.Show();
      }

      private void tab2_Click(object sender, EventArgs e)
      {
         Web3.Hide();
         Main.Hide();
         Url3.Hide();
         mainUrl.Hide();
         Go3.Hide();
         mainGo.Hide();
         Web2.Show();
         Url2.Show();
         Go2.Show();
      }

      private void tab3_Click(object sender, EventArgs e)
      {
         mainGo.Hide();
         Go2.Hide();
         mainUrl.Hide();
         Url2.Hide();
         Web2.Hide();
         Main.Hide();
         Web3.Show();
         Url3.Show();
         Go3.Show();
      }

      private void newTab_Click(object sender, EventArgs e)
      {
         newTab.Hide();
         newtab2.Show();
         Web2.Show();
         Main.Hide();
         mainUrl.Hide();
         Url2.Show();
         mainGo.Hide();
         Go2.Show();
         tab2.Show();
      }

      private void newtab2_Click(object sender, EventArgs e)
      {
         newtab2.Hide();
         Web2.Hide();
         Url2.Hide();
         Go2.Hide();
         tab3.Show();
         Go3.Show();
         Url3.Show();
         Web3.Show();
      }
   }
}

Please do not give up if you do not get it at first. It takes time to learn anything! So keep at it and I hope that you will get great at this some day!

Digg Digg It!     Del.icio.us Del.icio.us     Reddit Reddit     StumbleUpon StumbleIt     Newsvine Newsvine     Furl Furl     BlinkList BlinkList

Rate Rate this tutorial
Comment Current Comments
by VGstudios Owner on Friday, August 24th 2007 at 04:40 PM

I know there are some spelling errors in the tutorial... I'm sorry about that... i was making the program as i made the tutorial lol i tested the program the way i put it on here and it worked fine so i hope that it works for you.

by VGstudios Owner on Monday, August 27th 2007 at 02:31 PM

hey if you like this... add a comment... cause im board lol

by Travis on Saturday, September 1st 2007 at 11:26 PM

This is great! Does it work with .net 1.1 also or just 2.0?

by VGstudios Owner on Sunday, September 2nd 2007 at 04:23 PM

I am pretty sure it will work in both... its simple coding and all so it should! oh and thanks for the big thumbs up! =D

by VGstudios Owner on Tuesday, September 4th 2007 at 05:43 PM

If any one else thinks i did a good job tell me =P till you do... i dont know that i did rofl

by tobias on Thursday, September 20th 2007 at 12:18 PM

I like the simple approach but how about creating the webbrowser objects on the fly? so you start off with one and then when "new tab" is clicked, a new browser object is being created. this way you could have a limitless numer of tabs.

by VGstudios Owner on Thursday, September 20th 2007 at 05:35 PM

Now that you say that... i should... also... i wanna make it so that you can have a close tab button to! soon as i find out how to do it myself lol... thats how i work... i will find it out and then i will show all the awesome geekpedia... ers lol

by shrek professional on Sunday, October 7th 2007 at 08:15 PM

thanks alot all the best for you

by VGstudios_owner on Sunday, October 7th 2007 at 09:45 PM

Thanks bro! i am working on some new programs... if i find one that i think ya'll would like i will post a tutorial!

Regards,
VGstudios_Owner

by pavan on Friday, December 14th 2007 at 10:12 AM

u are right it takes time to learn any thing we shud not give up.. Thanx for the tutorial..

by VGstudios Owner on Friday, December 14th 2007 at 11:38 AM

Thanks! i'm now working with the creators of a program called CamStudio! Hopefully this will be a nice job type thing lol

by dharan on Friday, June 27th 2008 at 09:36 AM

Though i got a littlebit confusion while understanding at first, after concentrating i clearly understood it, wow Really its a wonderful
coding man keep it up. it wil be better if u still do some modifications for tab close.Any way Thanku

by scape on Tuesday, April 7th 2009 at 02:26 PM

I'd really like your tutorial. Really easy to understand and it helped me a lot. Thanks.

by Ahmed Mustafa on Monday, August 10th 2009 at 08:06 AM

You Could Make 3 Web Browsers 1 combobox instead of 3 buttons for changing tabs one button and one textbox for navigation (by making the web browser number as a byte and make an if statement i made a tabbed web browser with tab control and unlimited tabs but copied some things from express web browser (an open source web browser in msdn) such as new tabs and determining which tab is active but it is mostly done by me

by Caelan on Sunday, January 10th 2010 at 12:28 PM

Im just going to say, there are alot of better ways this could have been done. For example, creating methods to create/dispose of tabs and their containing browsers, creating the tabs and the browsers on the fly, and even creating a class to keep track of the browsers, and which one is selected. So that the go button can just call on the class for the instance of the open browser and use that instead of creating a new go button for every tab.

by Troy on Monday, September 6th 2010 at 02:32 AM

This fucking sucks ass.. You are a disgrace to all developers in the world. That is not how you create a tabbed web browser.. DO NOT FOLLOW THIS TUTORIAL! LEARN HOW TO GENERATE CONTROLS VIA CODE!

by Mike on Monday, September 6th 2010 at 02:33 AM

Lmfao, this is truely an example of true noobism. (a religion coming to your .NET based VB town)

by Metro Answering Service on Thursday, October 21st 2010 at 05:51 PM

24/7 Professional Answering Service, 45 years experience, packages starting at $16/month with Free Trial. Medical and Service companies are our specialty. Call Today 1-888-300-9098

http://www.metroansweringservice.com
Metro Answering Service

by Guess on Tuesday, March 29th 2011 at 10:13 AM

Show hide show hide show hide DUDE COMMON
learn programming --> start with the dummies serie

by romantic birthday wishes on Tuesday, August 16th 2011 at 01:48 AM

Now that you say that... i should... also... i wanna make it so that you can have a close tab button to! soon as i find out how to do it myself lol... thats how i work... i will find it out and then i will show all the awesome geekpedia... ers lol

by magazine subscriptions- on Monday, December 12th 2011 at 04:58 AM

Looks like you don't have permission over the Insert command. Check the user's credentials.and plix help me with the ASP code, for login. i want the registered users to login.When logging in the details should be retrieved from the database.

by Phen375 on Monday, December 19th 2011 at 06:01 PM

Your personal know-how and kindness in maneuvering every part was tremendous. I am not sure what I would've done if I hadn't encountered such a solution like this. I'm able to at this time look ahead to my future. Thanks a lot so much for the specialized and result oriented help. I won't hesitate to endorse the blog to anybody who desires assistance on this topic.

by GenF20 Plus on Monday, December 19th 2011 at 06:02 PM

Your personal know-how and kindness in maneuvering every part was tremendous. I am not sure what I would've done if I hadn't encountered such a solution like this. I'm able to at this time look ahead to my future. Thanks a lot so much for the specialized and result oriented help. I won't hesitate to endorse the blog to anybody who desires assistance on this topic.

by GenFX on Monday, December 19th 2011 at 06:03 PM

Your personal know-how and kindness in maneuvering every part was tremendous. I am not sure what I would've done if I hadn't encountered such a solution like this. I'm able to at this time look ahead to my future. Thanks a lot so much for the specialized and result oriented help. I won't hesitate to endorse the blog to anybody who desires assistance on this topic.

by Teeth Whitening Reviews on Tuesday, December 20th 2011 at 01:39 AM

I truly wanted to write a quick message to thank you for some of the splendid points you are showing at this website. My long internet investigation has at the end been compensated with sensible facts and techniques to share with my family and friends.

by Human Growth Hormone on Tuesday, December 20th 2011 at 01:41 AM

I truly wanted to write a quick message to thank you for some of the splendid points you are showing at this website. My long internet investigation has at the end been compensated with sensible facts and techniques to share with my family and friends.

by Best Diet Pills on Tuesday, December 20th 2011 at 01:46 AM

I would believe that we visitors are truly blessed to dwell in a wonderful network with many wonderful professionals with very beneficial hints. I feel extremely privileged to have seen the web pages and look forward to many more pleasurable times reading here. Thank you once again for everything.

by HGH Advanced on Tuesday, December 20th 2011 at 01:54 AM

I would believe that we visitors are truly blessed to dwell in a wonderful network with many wonderful professionals with very beneficial hints. I feel extremely privileged to have seen the web pages and look forward to many more pleasurable times reading here. Thank you once again for everything.

by Dental White on Tuesday, December 20th 2011 at 01:56 AM


Thanks so much for providing individuals with an extremely remarkable possiblity to read critical reviews from this web site. It is always so beneficial plus jam-packed with a great time for me personally and my office friends to search the blog at the least three times in one week to see the fresh secrets you will have.

by Pure Acai Berry Max on Tuesday, December 20th 2011 at 01:59 AM


Thanks so much for providing individuals with an extremely remarkable possiblity to read critical reviews from this web site. It is always so beneficial plus jam-packed with a great time for me personally and my office friends to search the blog at the least three times in one week to see the fresh secrets you will have.

by Ultimate Maqui Berry on Tuesday, December 20th 2011 at 02:02 AM

I am just always happy with your good tips and hints served by you. Some 1 areas in this article are undeniably the finest I've had.

by Proactol Plus on Tuesday, December 20th 2011 at 02:04 AM

I am just always happy with your good tips and hints served by you. Some 1 areas in this article are undeniably the finest I've had.

by Provacyl on Tuesday, December 20th 2011 at 02:09 AM

I am just always happy with your good tips and hints served by you. Some 1 areas in this article are undeniably the finest I've had.

by Nuratrim on Tuesday, December 20th 2011 at 02:13 AM

Thanks a lot for providing individuals with remarkably special possiblity to read critical reviews from this web site. It can be very kind plus packed with a great time for me personally and my office mates to visit your site no less than three times weekly to study the newest tips you have.

by Capsiplex on Tuesday, December 20th 2011 at 02:20 AM

Thanks a lot for providing individuals with remarkably special possiblity to read critical reviews from this web site. It can be very kind plus packed with a great time for me personally and my office mates to visit your site no less than three times weekly to study the newest tips you have.

by on Saturday, January 14th 2012 at 01:11 AM

Once you have recreated the problem and captured these steps, you can save them to a file and send it to your support person, who can then open it up and view

by analytics pricing on Monday, April 16th 2012 at 07:51 AM

These online tutorials are extremely helpful. Most users turn to these for help. Online resources are very useful and effective. If you are having problems with your computer then you could search online and find the answer.

by best remote access softwa on Tuesday, October 2nd 2012 at 02:40 AM

with your computer then you could search online and find the answer.

by fdgdfg on Thursday, February 14th 2013 at 07:11 AM

nice shit

by fdgdfg on Thursday, February 14th 2013 at 07:14 AM

at leat a usefull pic?..,*** **** but the only fucking picture , dont give any hint nice


Comment Comment on this tutorial
Name: Email:
Message:
Comment Related Tutorials
There are no related tutorials.

Comment Related Source Code
There is no related source code.

Jobs C# Job Search
My skills include:
Enter a City:

Select a State:


Advanced Search >>
Ads

From the creators of Geekpedia, a revolutionary new coupon website!

BargainEZ has coupons codes, printable coupons, bargains and it is the leading source of Passbook coupons for iPhone and iPod touch devices.

Coupons
Discover Geekpedia
Other Resources