Click here to Skip to main content
15,867,453 members
Please Sign up or sign in to vote.
2.71/5 (4 votes)
See more:
Image Capture Whole Web Page using C#[^]


The link provided above is a project used to take screenshot of internet explorer using C#.I downloaded that project and used it. But the output image created by the is a complete black image irrespective of the iexplorer window!!. Mine is an automation project and I need to take the screenshot of internet explorer webpages. Can anyone please help me?
the author of the project is http://www.codeproject.com/Members/Douglas-M-Weems[^]

[edit]Urgency deleted: It may be urgent to you, but it isn't to us. All that your stressing the urgency does is to make us think you have left it too late, and want us to do it for you. This annoys some people, and can slow a response.
- OriginalGriff[/edit]
Posted
Updated 8-Mar-11 2:47am
v3
Comments
Piccadilly Yum Yum 8-Mar-11 8:42am    
Get Focus on IE then send function key stamp

Don't post this under Questions & Answers - if you got the code from an article, then there is a "new message" button at the bottom of that article, which causes an email to be sent to the author. They are then alerted that you wish to speak to them.
Posting this here relies on them "dropping by" and realising it is for them.
 
Share this answer
 
Thanks for your suggestion OriginalGriff :)
I got the answer for that!!!
C#
//Get Browser "Document" Handle

           while (hwndInt != 0)
           {
               hwndInt = hwnd.ToInt32();
               GetClassName(hwndInt, sbc, 256);

               if(sbc.ToString().IndexOf("Shell DocObject View", 0) > -1)
               {
                   hwnd = FindWindowEx(hwnd, IntPtr.Zero, "Internet Explorer_Server", IntPtr.Zero);
                   break;
               }
               if (sbc.ToString().IndexOf("TabWindowClass", 0) > -1) //IE7
               {
                   hwnd = FindWindowEx(hwnd, IntPtr.Zero, "Shell DocObject View", IntPtr.Zero);
                   hwnd = FindWindowEx(hwnd, IntPtr.Zero, "Internet Explorer_Server", IntPtr.Zero);
                   break;
               }
               if (sbc.ToString().IndexOf("Frame Tab", 0) > -1) // IE8
               {
                   hwnd = FindWindowEx(hwnd, IntPtr.Zero, "TabWindowClass", IntPtr.Zero);
                   hwnd = FindWindowEx(hwnd, IntPtr.Zero, "Shell DocObject View", IntPtr.Zero);
                   hwnd = FindWindowEx(hwnd, IntPtr.Zero, "Internet Explorer_Server", IntPtr.Zero);
                   break;
               }

               hwnd = GetWindow(hwnd, GW_HWNDNEXT);

           }



is the modification i need to do in the existing code!!!
 
Share this answer
 
Comments
[no name] 16-Jan-15 9:58am    
still doesn't work for IE 11

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900