Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.IO;
- using System.Text;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Windows.Forms;
- namespace WindowsFormsApplication1
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- private void Form1_Load(object sender, EventArgs e)
- {
- }
- void webBrowser1_Navigated(object sender, WebBrowserNavigatedEventArgs e)
- {
- textBox2.Text = webBrowser1.Document.Body.OuterText;
- }
- string html;
- private void Form1_Shown(object sender, EventArgs e)
- {
- StreamReader sr = new StreamReader("./test.html", Encoding.GetEncoding("Shift_JIS"));
- html = sr.ReadToEnd();
- sr.Close();
- textBox1.Text = html;
- webBrowser1.Navigated += new WebBrowserNavigatedEventHandler(webBrowser1_Navigated);
- webBrowser1.DocumentText = html;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement