[RESOLVED] placing another window inside of form
say I have shelled an instance of the command prompt and I want that to show on my form. Another programmer told me that I need to use a picture box on the form, get the handle of the shelled program, then place the program in the picture box.
Not sure how to do this. I can't find how to get the handle of a particular window with .net and I'm unclear on how to "place" said window in the picture box. I've looked all over my msdn and here at this forum and couldn't find anything helpful. could someone give me a hand?
here's what i have so far
VB Code:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Shell("cmd /k cd c:\")
Dim hMainWnd As Long
Dim hChildWnd As Long
hChildWnd = FindWindowEx(0, 0, "C:\", "c:\")
hMainWnd = FindWindowEx(0, 0, "form1", "Form1")
SetParent(hChildWnd, hMainWndl)
End Sub