LoginSignup
13
13

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>
13
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
13
13