How to use Web Browser control in Visual Studio 2005
This article illustrates the use use of web-browser control in Visual Studio 2005 and creating a web browser to visit websites.
1. Create a new Windows Application.
2. Now add a Panel and Dock it to the top. (For the Address Bar and GO Button)
3. Now add web browser control from the toolbox.
4. Add the label, textbox and button on the panel.
5. Now the basic structure is ready, its time for the real action.
Double click on the Button to generate a event handler and type the following code
private void button1_Click(object sender, EventArgs e)
6. Now, just build your solution and type any website name in the address bar and click on go button.
Note: The website address should be in the format http://www.websitename.com
you can add several extra features to the Windows form that you have created..
- Status Strip
- Menu Strip
- Accept Button (to generate the event when user hits ENTER in the address bar)