Run a foreign exe inside a windows form app C#

Tuto4free · 87K views · 2014 · 2:54

Open on YouTube

Software (other)Python, Ruby & scripting languagestutorialdated

Why Stack Overflow recommends it

Stack Overflow users link it as a visual example of hosting a foreign exe inside their own GUI when asking how to do the same in Python, JavaFX, Java Swing or UWP.

Recommended by 0 people across 0 different months, 2016 to 2019.

What it is

A short screencast showing how to embed another program's window, such as calc.exe, inside a panel of a C# Windows Forms app. It demonstrates the technique of launching an external executable and reparenting its window into the host application's UI.

What people said

Cites Tony Chamberlain · 2016-08 · Stack Overflow · on “Running a program inside a Windows Form in Windows 10”

This question has been answered for earlier Windows OS multiple times on Stack Overflow and even has a video guide here: [this video] However, when I implement the code to start calc.exe inside my simple windows form Calc will start outside my form. I created a form and added a click handler with this code: [DllImport("user32.dll")] static extern IntPtr SetParent(IntPtr hWndChild, IntPtr hWndNewParent); And inside the click handler: Process p = Process.Start("calc.exe"); p.WaitForInputIdle(); SetParent(p.MainWindowHandle, this.Handle); If I add this code: MessageBox.Show(DateTime.Now.ToLongTimeString()); Process p= Process.Start("calc.exe"); Thread.Sleep(1000); MessageBox.Show("Process exited at:

Cites SDE · 2017-01 · Stack Overflow · on “Run a foreign exe inside a Python GUI (PyQt)”

I want to run an exe (for example calc.exe or cmd.exe) inside a python gui (python 2.7 | Windows | PyQt). Have anybody an idea how can i do this? (something like that : [this video] ) Thanks all in advance.

Cites KoRaP CZ · 2018-11 · Stack Overflow · on “Add JPanel to JFrame from another project”

I would like to make a program where I can add something like "plug-ins". Lets say I have Project1 where I have JFrame and Project2 where I have JPanel . The point is, that user can develop his own programs (plug-ins) and than add it to the main program ( Project1 ). So... I export frame as runnable JAR file and export panel as runnable JAR file (or only as JAR file?). What I want to do is to show panel in frame. Simply I want to do something like this [LINK] or this [this video] but only in Java and with panel, I don't need to run any .exe programs. (It's going to run on Linux not Windows). My professional picture that should describe what I want to do :) image [LINK] Is there some way to do thi

Cites Anton Ivannyk · 2019-04 · Stack Overflow · on “How to open exe application inside of the UWP app?”

Is there any solution how to open exe file (as for me as example it's Flash app and Prezi.exe) in view in the UWP app? Something like this [this video]

Cites mrus · 2019-10 · Stack Overflow · on “Is there any way to run a foreign exe inside a window in JavaFX?”

I'm trying to run a application inside a JavaFX window. I found that quiet simple and easier to do it in Winform .NET by using "user32.dll". For example: [this video] How can I do like that in JavaFX?