Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Opening an application inside a form - C# or VB.NET

I am writing an application and I would like to be able to display another application inside it. (Think like a windows form with a small box, or a tab that is displaying a totally seperate application.)

Is that something that can be done? If so, can anyone give some direction on how to go about doing it?

I am looking for something in the C# or VB.NET world.

THANKS!

like image 455
The Sasquatch Avatar asked Nov 06 '08 15:11

The Sasquatch


1 Answers

You need a hWnd (handle) of window from another application. Then you need a hWnd of container control in you application (System.Windows.Forms.Control.Handle property).

Then you need use a Win32API function SetParent, and that all you need. On the SetParent page is little sample, which should do what you need.

like image 193
TcKs Avatar answered Oct 21 '22 10:10

TcKs