Một chương trình có thể đặt bên trong một chương trình khác; một chương trình có thể chứa vài chương trình khác trong giao diện của nó
Host a process window inside your applications window
Visual C# Code:
.... { sw.Start(); int timeout = 10 * 1000; // Timeout value (10s) in case we want to cancel the task if it's taking too long. Process p = Process.Start(path); { System.Threading.Thread.Sleep(10); p.Refresh(); { sw.Stop(); } } SetParent(p.MainWindowHandle, handle); // Set the process parent window to the window we want SetWindowPos(p.MainWindowHandle, 0, 0, 0, 0, 0, 0x0001 | 0x0040); // Place the window in the top left of the parent window without resizing it }
https://www.fluxbytes.com/csharp/host-a-process-window-inside-your-applications-window/