15
13

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

WPFに外部アプリ(Window)を埋め込む

Posted at
MainWindow.xaml.cs
var psi = new ProcessStartInfo(@"program_path");

var process = Process.Start(psi);
process.WaitForInputIdle();

System.Threading.Thread.Sleep(3000);
SetParent(process.MainWindowHandle, _panel.Handle);
MainWindow.xaml
<WindowsFormsHost>
    <forms:Panel x:Name="_panel" />
</WindowsFormsHost>
15
13
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
15
13

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?