I have been able to make it work but not in an elegant way. Therefore I will share what I did.
Apparently the issue is that the external app needs some time to load completely eventhough the code processes all without waiting. Therefore I included a system thread delay and tried different timings until a good one was obatined.
This is the code to start the process from button2_click:
myProcess.Start()
myProcess.EnableRaisingEvents = True
AddHandler myProcess.Exited, AddressOf ProcessExited
myProcess.WaitForInputIdle()
System.Threading.Thread.Sleep(350)
SetParent(myProcess.MainWindowHandle, Panel1.Handle)
If the system threading sleep time is less than 350 it will not bring the external app inside panel1. If it is greater than 350 then a flickering effect is noticeable to the user and not very nice.
There should be a way to capture if the external app has loaded completely instead of using the delay, because I am not sure if the timing depends on the user's PC or not.
The point is that the problem was due to the external app needing time to load completely before setting panel1 as the parent. I am sure a more elegant solution is possible and will appreciate suggestions on how to capture when the external app has loaded completely.