ここはWPF用なの。Formなら、こっちね→(ロードしたホームページのソースコードを見る)
Formじゃなくてもできるのねえって、あたりまえか。ちょっとクセあるけどね。
といっても、ただNavigateするだけならFormのブラウザとほとんど変わらないわね。明らかな相違点だけ書いておくわ。
Formと全然違うのね。ネットにあった情報から、こうしてみたわ。
using System.Reflection; : : var axIWebBrowser2 = typeof(WebBrowser).GetProperty("AxIWebBrowser2",BindingFlags.Instance | BindingFlags.NonPublic); var comObj = axIWebBrowser2.GetValue(web1, null); // 値の設定 comObj.GetType().InvokeMember ( "Silent", BindingFlags.SetProperty, null, comObj, new object[] { true } );
string title = ((dynamic)webBrowser.Document).Title;
string source = ((dynamic)webBrowser.Document).documentElement.InnerHtml;
ふむ。
#ref(): File not found: "wpf_web1.jpg" at page "WpfでWebBrowserを使ってみた"