Hi,
I am using VS 2010 to create an automation with .net 4 framework, and Spy++ toolkits for help.
1. The project i am creating is in windown form with a form called "TaskForm". When I click the button "Open FirstApp", the external window app "FirstApp.exe" proccess openned up (this is 3rd party vendor app)
2. From my application "TaskForm", i send data to textbox/combobox and send "Submit" button to "FirstApp.exe" using SendMessage method through DllImport("user32.dll"). After message was sent, this application openned up an IE window with secured data transfer and such.
hwnd = FindWindow("WindowsForms1.Window.11.app.0.34323e", "FirstApp");
setForegroundWindow(hwnd);
locHwnd = FindWindowEx(hwnd, locHwnd, "WindowsForms1.EDIT.app.0.34323e", "RefNumber");
SendMessage(locHwnd, WM_SETTEXT, (int)IntPtr.Zero, "15");
hwndChild = FindWindowEx((IntPtr)hwnd, IntPtr.Zero, "WindowsForms1.BUTTON.app.0.34323e", "Submit");
SendMessage(hwndChild, BN_CLICKED, 0, "");
3. Now, i am able to focus on the IE page but having really hard time trying to gain control and navigate through the IE page and I need help. What are the components i need in order for me to control the current active IE page and navigate through?
hwnd = FindWindow("IEFrame", "");
SetForegroundWindow(hwnd);
Important Notes: Using WebBrowser toolbox in Visual Studio 2010 won't work becuase navigation to the same URL gives error. I have to work with IE window as an External Application. With different project, I used WebBrower tool to open up an URL and able to navigate through the site with no issue, just don't know how to gain control outside of VS WebBrowser tool.
Any lead would be really appreciated.
Thank you!