C#完成基於IE內核的簡略閱讀器完全實例。本站提示廣大學習愛好者:(C#完成基於IE內核的簡略閱讀器完全實例)文章只能為提供參考,不一定能成為您想要的結果。以下是C#完成基於IE內核的簡略閱讀器完全實例正文
本文實例講述了C#完成基於IE內核的簡略閱讀器。分享給年夜家供年夜家參考。詳細以下:
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 導航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 進步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"); } } }
運用法式進口文件以下:
using System; using System.Collections.Generic; using System.Linq; using System.Windows.Forms; namespace Kit_Browser { static class Program { /// <summary> /// 運用法式的主進口點。 /// </summary> [STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Form1()); } } }
完全實例代碼點擊此處本站下載。
願望本文所述對年夜家的C#法式設計有所贊助。