In VB 2005, I want to be able to make a window and then have a program i already created RUN in the window INSIDE VB 2005.. So for example: I want to be able to make a Window inside VB 2005 and be able to run MS Word.. Is this possible and how would i go about doing this?? I Know I can Run Ms Word and other programs externally but how can I make them run inside my VB 2005 Window.. Thank you for your help..

I have a working code in VFP, I try to convert to Vb.Net and It gives error, I got the help from Dave Kreskowiak from code project. and here it is the working code

' Add a panel to the form
' Form Declaration 
Private Declare Auto Function SetParent Lib "user32" (ByVal hwndChild As IntPtr, ByVal hwndParent As IntPtr) As IntPtr
' Button1_Click
Dim p As Process = Process.Start("Excel.exe")
SetParent(p.MainWindowHandle, Panel1.Handle)

It is not error tested and should be controlled more.


This question has already been answered. Start a new discussion instead.