I am starting a process like this:
Dim pInfo As New ProcessStartInfo
Dim p As Process
pInfo.FileName = "C:\Program Files\Internet Explorer\iexplore.exe"
pInfo.Arguments = "http://www.yahoo.com
'Start the process.
p = Process.Start(pInfo)
Works fine to start the process with IE and Yahoo's homepage in it. Then I need to get the IE window handle. I use FindWindwEx to find that window based on the class and caption of the window. But I'd like to be able to reference the window handle directly and not have to seach for it with FindWindowEx. I will have a number of them up at a time and I might have different instances of the IEFrame class but it is possible the captions might be the same.
So my question is...is the process handle the same as the window handle ? If not, how can I get the window handle based on the process handle ?