There was a post here about the same problem that I have:
\r\n
http://www.xtremevbtalk.com/showthread.php?t=272163\r\nHowever, this problem was dealing with VB6 (I am using VB2010) and the code was much different. I tried but still couldn\'t figure out the right way.
\r\n
\r\nNow I am trying to implement an EXE file (a rotating cube exe file) inside a form that can be open by a click. I don\'t want it to pop up a new window but instead inside a control box within a window (e.g a PictureBox control).
\r\n
\r\nI have this code which can implement the notepad inside the form, but it cannot do that for the rotating cube exe file, it would pop up a new window.
\r\n
\r\nDeclare Auto Function SetParent Lib "user32" (ByVal hWndChild As IntPtr, ByVal hWndNewParent As IntPtr) As IntPtr
\r\nDim MyPSI As New ProcessStartInfo("notepad.exe")
\r\nDim MyProcess As Process = Process.Start(MyPSI)
\r\nMyProcess.WaitForInputIdle()
\r\nSetParent(MyProcess.MainWindowHandle, Me.Handle)
\r\n
\r\nI have spent hours and I\'m still stuck on this. Any help would be much appreciate.
\r\nThank you.
\r\n \r\n\r\n