<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>gingakyo</author_name>
  <author_url>https://blog.hatena.ne.jp/gingakyo/</author_url>
  <blog_title>見よう見まねで Programmingライフ</blog_title>
  <blog_url>https://gingakyo-b.hatenablog.com/</blog_url>
  <categories>
    <anon>PowerShell</anon>
  </categories>
  <description>前の記事の続きです。 WebView2のCompleted()系を別スレッドを使って同期的に待つ実装。 -目次- 別スレッドを使った実装 概要 画面側のコード メインスレッド側のコード サンプルソース全文 別スレッドを使った実装 概要 前提のプログラムの構成と処理の流れは、数個前の記事で書いた通りで、新しいPowerShellオブジェクトとRunspaceを作って、Form画面を別スレッドで実行するというもの。そのForm画面に貼り付けたWebView2コントロールとのやり取りがここでの実装内容です。 同期的に待つというのは、本スレッド側でWait-eventでイベント待ちすることで一連の処理…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fgingakyo-b.hatenablog.com%2Fentry%2F2026%2F04%2F13%2F134320&quot; title=&quot;（続き）PowerShellでWebView2のCompleted()系を同期的に待つ - 見よう見まねで Programmingライフ&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn-ak.f.st-hatena.com/images/fotolife/g/gingakyo/20260406/20260406024933.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2026-04-13 13:43:20</published>
  <title>（続き）PowerShellでWebView2のCompleted()系を同期的に待つ</title>
  <type>rich</type>
  <url>https://gingakyo-b.hatenablog.com/entry/2026/04/13/134320</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
