Archive for the ‘C#’ Category

Web_Browser

Posted: October 14, 2012 in C#
Tags: , , ,

Image

FIG: Develop this UI in Visual Studio. Then enter the following code in source window.

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

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

private void button1_Click(object sender, EventArgs e)
{
String s = comboBox1.Text+”://”+textBox1.Text;
label1.Text = s;
this.webBrowser1.Navigate(s);
}

private void Form1_Load(object sender, EventArgs e)
{

}
private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{
progressBar1.Increment(100);
//   progressBar1.Increment(0);

}

private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
{

}

private void progressBar1_Click(object sender, EventArgs e)
{

}
}
}

 

Advertisements