{"id":4261,"date":"2018-09-22T22:07:34","date_gmt":"2018-09-22T13:07:34","guid":{"rendered":"https:\/\/elleneast.com\/?p=4261"},"modified":"2018-09-22T22:21:24","modified_gmt":"2018-09-22T13:21:24","slug":"%e3%80%90vb-net%e3%80%91%e3%80%90wpf%e3%80%91webbrowser-%e3%82%b3%e3%83%b3%e3%83%88%e3%83%ad%e3%83%bc%e3%83%ab%e4%b8%8a%e3%81%ae-html-%e3%81%ae%e3%83%aa%e3%83%b3%e3%82%af%e3%82%92%e3%83%87%e3%83%95","status":"publish","type":"post","link":"https:\/\/elleneast.com\/?p=4261","title":{"rendered":"\u3010VB.NET\u3011\u3010WPF\u3011WebBrowser \u4e0a\u306e\u30ea\u30f3\u30af\u3092\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30d6\u30e9\u30a6\u30b6\u3067\u958b\u304f"},"content":{"rendered":"<p>WPF \u306e WebBrowser \u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u306b\u8868\u793a\u3055\u308c\u3066\u3044\u308b HTML \u306e\u30ea\u30f3\u30af\uff08target= \u201c_blank\u201d \u304c\u4ed8\u3044\u3066\u3044\u308b\u3082\u306e\uff09\u3092\u30e6\u30fc\u30b6\u30fc\u304c\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u3001\u30b7\u30b9\u30c6\u30e0\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30d6\u30e9\u30a6\u30b6\u304c\u30ac\u30f3\u7121\u8996\u3055\u308c\u3066\u3001\u5e38\u306b IE \u3067\u958b\u304b\u308c\u3066\u3057\u307e\u3044\u307e\u3059\u3002\uff08\u306a\u3093\u3068\u3044\u3046\u4ed5\u69d8\u3067\u3042\u308a\u307e\u3057\u3087\u3046\u304b\uff09<\/p>\n<p>Forms \u306e WebBrowser \u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u306e\u5834\u5408\u3067\u3042\u308c\u3070\u5341\u5206\u306a\u91cf\u306e\u5bfe\u7b56\u304c\u30cd\u30c3\u30c8\u691c\u7d22\u3067\u898b\u3064\u304b\u308b\u3088\u3046\u3067\u3059\u304c\u3001WPF \u306e\u60c5\u5831\u306f\u5c11\u306a\u3044\u3088\u3046\u3067\u3059\u306d\u3002<\/p>\n<p>WPF \u306e WebBrowser \u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u306b\u8868\u793a\u3055\u308c\u3066\u3044\u308b HTML \u306e\u30ea\u30f3\u30af\u3092\u30af\u30ea\u30c3\u30af\u3057\u305f\u3068\u304d\u306b\u3001\u30b7\u30b9\u30c6\u30e0\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30d6\u30e9\u30a6\u30b6\u3067\u958b\u304b\u308c\u308b\u3088\u3046\u306b\u3059\u308b\u306b\u306f\u6b21\u306e\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>1. HTML \u306e\u30ea\u30f3\u30af\u304b\u3089 target=\u201d_blank\u201d \u3092\u53d6\u308a\u9664\u304d\u307e\u3059\uff08\u65e2\u5b58\u306e HTML \u3092\u4f7f\u7528\u3059\u308b\u3068\u304d\u306f\u3001WebBrowser \u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u306b\u8aad\u307f\u8fbc\u3080\u6642\u306b\u53d6\u308a\u9664\u3051\u3070\u826f\u3044\u3067\u3057\u3087\u3046\uff09\u3002<\/p>\n<p>2. WebBrowser \u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u306e Navigating \u30a4\u30d9\u30f3\u30c8\u3092\u6b21\u306e\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:vbnet decode:true\" style=\"padding-left: 30px;\">Dim bFirstNavigatingDone As Boolean = False\n\nPrivate Sub body_Navigating(sender As Object, e As NavigatingCancelEventArgs) Handles body.Navigating\n\nIf bFirstNavigatingDone = False Then\n    '\u6700\u521d\u306e\u30da\u30fc\u30b8\u306f\u8aad\u307f\u8fbc\u307e\u305b\u308b\u3060\u3051\u3002\n    bFirstNavigatingDone = True\n    Return\nEnd If\n\n'\u30da\u30fc\u30b8\u4e0a\u306e\u30ea\u30f3\u30af\u304c\u30af\u30ea\u30c3\u30af\u3055\u308c\u305f\u3089 .Navigating \u30a4\u30d9\u30f3\u30c8\u3092\u30ad\u30e3\u30f3\u30bb\u30eb\u3002\ne.Cancel = True\n\n'\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30d6\u30e9\u30a6\u30b6\u3067\u30ea\u30f3\u30af\u3092\u958b\u304f\u3002\nSystem.Diagnostics.Process.Start(e.Uri.ToString)\n\nEnd Sub<\/pre>\n<p>\u30ea\u30f3\u30af\u306b target=\u201d_blank\u201d \u304c\u4ed8\u3044\u3066\u3044\u308b\u3068 Navigating \u30a4\u30d9\u30f3\u30c8\u304c\u547c\u3070\u308c\u305a\u306b IE \u3067\u958b\u304b\u308c\u3066\u3057\u307e\u3046\u306e\u3067\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>WPF \u306e WebBrowser \u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u306b\u8868\u793a\u3055\u308c\u3066\u3044\u308b HTML \u306e\u30ea\u30f3\u30af\uff08target= \u201c_blank\u201d \u304c\u4ed8\u3044\u3066\u3044\u308b\u3082\u306e\uff09\u3092\u30e6\u30fc\u30b6\u30fc\u304c\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u3001\u30b7\u30b9\u30c6\u30e0\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30d6\u30e9\u30a6\u30b6\u304c\u30ac\u30f3\u7121\u8996\u3055\u308c\u3066\u3001\u5e38\u306b I &#8230; <\/p>\n","protected":false},"author":1,"featured_media":2656,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[57],"tags":[60,62],"class_list":{"0":"post-4261","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-57","8":"tag-vb-net","9":"tag-wpf"},"_links":{"self":[{"href":"https:\/\/elleneast.com\/index.php?rest_route=\/wp\/v2\/posts\/4261","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/elleneast.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/elleneast.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/elleneast.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/elleneast.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4261"}],"version-history":[{"count":2,"href":"https:\/\/elleneast.com\/index.php?rest_route=\/wp\/v2\/posts\/4261\/revisions"}],"predecessor-version":[{"id":4263,"href":"https:\/\/elleneast.com\/index.php?rest_route=\/wp\/v2\/posts\/4261\/revisions\/4263"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/elleneast.com\/index.php?rest_route=\/wp\/v2\/media\/2656"}],"wp:attachment":[{"href":"https:\/\/elleneast.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4261"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/elleneast.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4261"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/elleneast.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4261"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}