C#實現(xiàn)基于IE內(nèi)核的簡單瀏覽器完整實例
更新時間:2015年07月16日 10:08:30 作者:宋勇野
這篇文章主要介紹了C#實現(xiàn)基于IE內(nèi)核的簡單瀏覽器,較為詳細(xì)的分析了C#實現(xiàn)瀏覽器的原理與主要功能實現(xiàn)方法,并附帶完整實例供大家下載,需要的朋友可以參考下
本文實例講述了C#實現(xiàn)基于IE內(nèi)核的簡單瀏覽器。分享給大家供大家參考。具體如下:
Form1.cs如下:
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 Kit_Browser
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
comboBox1.SelectedIndex = 0;
webBrowser1.GoHome();
}
private void goButton_Click(object sender, EventArgs e)
{
webBrowser1.Navigate(new Uri(comboBox1.SelectedItem.ToString()));
}
private void 導(dǎo)航ToolStripMenuItem_Click(object sender, EventArgs e)
{
}
private void 主頁ToolStripMenuItem_Click(object sender, EventArgs e)
{
webBrowser1.GoHome();
}
private void 返回ToolStripMenuItem_Click(object sender, EventArgs e)
{
webBrowser1.GoForward();
}
private void 前進(jìn)ToolStripMenuItem_Click(object sender, EventArgs e)
{
webBrowser1.GoBack();
}
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
}
private void aboutToolStripMenuItem_Click(object sender, EventArgs e)
{
MessageBox.Show("作者:李博文\nQ Q:1053112601","Kit Browser");
}
}
}
應(yīng)用程序入口文件如下:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace Kit_Browser
{
static class Program
{
/// <summary>
/// 應(yīng)用程序的主入口點。
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
}
完整實例代碼點擊此處本站下載。
希望本文所述對大家的C#程序設(shè)計有所幫助。
相關(guān)文章
C#編程實現(xiàn)發(fā)送郵件的方法(可添加附件)
這篇文章主要介紹了C#編程實現(xiàn)發(fā)送郵件的方法,具備添加附件的功能,涉及C#文件傳輸及郵件發(fā)送的相關(guān)技巧,具有一定參考借鑒價值,需要的朋友可以參考下2015-11-11
C#中out參數(shù)、ref參數(shù)與值參數(shù)的用法及區(qū)別
這篇文章主要給大家介紹了關(guān)于C#中out參數(shù)、ref參數(shù)與值參數(shù)的用法及區(qū)別的相關(guān)資料,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2018-09-09

