hogan9111
asked on
vb.net embedding notepad or any other program to a form
I am using vb.net and I want to have the programs embedded into a form.
In vb6 i use to use
Dim ret As Long
ret = FindWindow("Opusapp", vbNullString)
SetParent ret, form1.hwnd
form1.Show
I tried
Dim myhandle As IntPtr
Shell("c:\windows\notepad. exe", AppWinStyle.NormalFocus, True)
myhandle = FindWindow("Untitled - Notepad", vbNullString)
Dim form1 As New Form1
SetParent(myhandle, form1.Handle)
form1.Show()
it opens notepad but not inside form1
what can I do....
In vb6 i use to use
Dim ret As Long
ret = FindWindow("Opusapp", vbNullString)
SetParent ret, form1.hwnd
form1.Show
I tried
Dim myhandle As IntPtr
Shell("c:\windows\notepad.
myhandle = FindWindow("Untitled - Notepad", vbNullString)
Dim form1 As New Form1
SetParent(myhandle, form1.Handle)
form1.Show()
it opens notepad but not inside form1
what can I do....
see https://www.experts-exchange.com/questions/21076597/open-external-application-inside-picture-box.html#11695337
ASKER
too confussing, don't know what to do in that forum....
have you tried the code from mcsd2001 that has been accepted as the answer?
ASKER
yes I didn't know where to copy and paste it. And I tried it but got errors.....
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ok, but how do u do that with other application, I tried doing it with acrobat reader and nothing happened, just open the application.
ASKER
you there
I think I deserve some points on that. The question was first asking about Notepad and I did that!
thats impressive