title: VB.NET example code for calling other exe to act like as MDI child form? is it possible?
body: <p>ok here is the scenario.<br>
  1. i've create a project that has 1 form named form1.exe<br>
  2. i've also create a project that has 1 MDI form.<br>
  in this MDI Form. i'would like to call "form1.exe" act like / behave like MDI Form child.
  i've tried using this code : </p>
  
  <pre><code>Public Shared Function SetParent(ByVal hWndChild As IntPtr, ByVal hWndParent As IntPtr) As IntPtr
  End Function
  
  
  Private Sub ShowNewForm(ByVal sender As Object, ByVal e As EventArgs) Handles NewToolStripMenuItem.Click, NewToolStripButton.Click, NewWindowToolStripMenuItem.Click
      Dim myProcess As Process = New Process()
      myProcess.StartInfo.FileName = "D:\tesVB.exe"
      myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Normal
      myProcess.Start()
      myProcess.WaitForInputIdle()
      SetParent(myProcess.MainWindowHandle, Me.Handle)
      myProcess.WaitForExit()
  End Sub
  </code></pre>
  
  <p>Above code is worked but that new child form(form1.exe) doesn't act like it should be! When i maximized or minimized it. it don't act like MDI Child Form.<br>
  Can anyone give me another better example code ? thx before.</p>