C#實(shí)現(xiàn)基于IE內(nèi)核的簡單瀏覽器完整實(shí)例
更新時間:2015年07月16日 10:08:30 作者:宋勇野
這篇文章主要介紹了C#實(shí)現(xiàn)基于IE內(nèi)核的簡單瀏覽器,較為詳細(xì)的分析了C#實(shí)現(xiàn)瀏覽器的原理與主要功能實(shí)現(xiàn)方法,并附帶完整實(shí)例供大家下載,需要的朋友可以參考下
本文實(shí)例講述了C#實(shí)現(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)用程序的主入口點(diǎn)。 /// </summary> [STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Form1()); } } }
完整實(shí)例代碼點(diǎn)擊此處本站下載。
希望本文所述對大家的C#程序設(shè)計(jì)有所幫助。
您可能感興趣的文章:
- C#實(shí)現(xiàn)清除IE瀏覽器緩存的方法
- C# 利用Selenium實(shí)現(xiàn)瀏覽器自動化操作的示例代碼
- C#瀏覽器提示跨域問題解決方案
- C# 模擬瀏覽器并自動操作的實(shí)例代碼
- C#導(dǎo)出pdf的實(shí)現(xiàn)方法(瀏覽器不預(yù)覽直接下載)
- C# WinForm實(shí)現(xiàn)圖片瀏覽器
- C#文件下載實(shí)例代碼(適用于各個瀏覽器)
- C#實(shí)現(xiàn)多選項(xiàng)卡的瀏覽器控件
- C#編程實(shí)現(xiàn)簡易圖片瀏覽器的方法
- C#使用默認(rèn)瀏覽器打開網(wǎng)頁的方法
- c# 從IE瀏覽器獲取當(dāng)前頁面的內(nèi)容
相關(guān)文章
C#實(shí)現(xiàn)的調(diào)用DOS命令操作類實(shí)例
這篇文章主要介紹了C#實(shí)現(xiàn)的調(diào)用DOS命令操作類,實(shí)例分析了C#調(diào)用系統(tǒng)常用DOS命令的相關(guān)技巧,非常具有實(shí)用價值,需要的朋友可以參考下2015-04-04C#編程實(shí)現(xiàn)發(fā)送郵件的方法(可添加附件)
這篇文章主要介紹了C#編程實(shí)現(xiàn)發(fā)送郵件的方法,具備添加附件的功能,涉及C#文件傳輸及郵件發(fā)送的相關(guān)技巧,具有一定參考借鑒價值,需要的朋友可以參考下2015-11-11C#中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-09C# 輸出字符串到文本文件中的實(shí)現(xiàn)代碼
本文通過一個簡單的代碼給大家介紹C# 輸出字符串到文本文件中,代碼簡單易懂,非常不錯,具有一定的參考借鑒價值,需要的朋友參考下吧2018-05-05