I found one problem Windows Server 2008. please refer the following code. it gives me the "ieplorer.exe" while i am running this code in XP or 2003, but while I am running this code in Windows Server 2008 it is not giving me the proper result. it gives me "Explorer.EXE" insted "ieplorer.exe".
before run this command you have to add reference of shdocvw.dll in your project. i am using the VB
- Dim IE As SHDocVw.InternetExplorer
- Dim MainIE as SHDocVw.InternetExplorer
- Dim sws As SHDocVw.ShellWindows
- Dim ie As SHDocVw.InternetExplorer
- Set sws = New SHDocVw.ShellWindows
- For Each ie In sws
- Debug.Print ie.Name
- If ie.Hwnd=TmpStoredHandle then
- Set MainIE =IE
- Exit For
- End IF
With the Help of above code my MainIE Object will set to my Previously stored handle( In TmpStoredHandle) .
Does anybody know that how can i get the existing IE(Opened Internet Explorer) detail with the help of SHDocVw.ShellWindows in Windows Server 2008?
I have also try to get the same thing with the help of EnumWindows AddressOf GetTopWindows, ByVal 0&
with this API i can get all the opened windows with Its handle, but i dont know that how can i set my MainIE with help of this handle.
Can anybody help me?
Thanks in Advance