Click here to Skip to main content
15,890,690 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Currently I am using the White API to control a WPF application, but the White API has no functionality to generate a bitmap image of the current window for which it is generating UI events for. So, I am looking for some example code where I can take a snapshot of an external WPF window running in a separate process (application under test) passing in an UIAutomationClient.AutomationElement. So far, I have only managed to find screen capture source examples for GDI screen capture applications where they will not capture the image of a running WPF application. Any suggestions on where to look is greatly appreciated.
Posted

1 solution

I found this on google:

http://www.c-sharpcorner.com/UploadFile/perrylee/ScreenCapture11142005234547PM/ScreenCapture.aspx[^]

Before using that example, I would check pInvoke for the correct signatures of the interop calls because I'm almost positive that what you see at the link provided won't work on a 64-bit system. pInvoke has the right method prototypes.
 
Share this answer
 

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