Click here to Skip to main content
11,649,522 members (77,602 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET
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 8-Mar-11 2:34am
Edited 8-Mar-11 2:47am
v3
Comments
Piccadilly Yum Yum at 8-Mar-11 8:42am
   
Get Focus on IE then send function key stamp
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Thanks for your suggestion OriginalGriff Smile | :)
I got the answer for that!!!
//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!!!
  Permalink  
Comments
Member 11379890 at 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)

  Print Answers RSS
0 OriginalGriff 379
1 Kornfeld Eliyahu Peter 309
2 Maciej Los 299
3 F-ES Sitecore 284
4 CPallini 280
0 OriginalGriff 1,577
1 Sergey Alexandrovich Kryukov 1,087
2 CPallini 1,015
3 DamithSL 996
4 jyo.net 994


Advertise | Privacy | Mobile
Web04 | 2.8.150804.4 | Last Updated 8 Apr 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100