Can I take snapshot of the my Desktop using Ranorex 1.5 : Automation API

Can I take snapshot of the my Desktop using Ranorex 1.5

Class library usage, coding and language questions.

Can I take snapshot of the my Desktop using Ranorex 1.5

Postby balajichandan » Tue Apr 14, 2009 1:41 pm

Hi,
This is Balaji. Is there a way that I can enumerate all the dialogs available at one point of time. Is there a way to take snapshot of my desktop to see all the windows available at that point of time.
balajichandan
 
Posts: 24
Joined: Tue Apr 14, 2009 1:29 pm

Postby Support Team » Thu Apr 16, 2009 1:53 pm

You can enumerate all currently available top-level forms using the Ranorex.Application.Forms property that returns a list of Form instances.
The desktop itself is a top-level form and its classname is "Progman". So, you can search for that classname and then use the CaptureImage method make a screenshot:
Code: Select all
Form desktop = Application.FindFormClassName("Progman");
Bitmap screenshot = desktop.CaptureImage();


Regards,
Alex
Ranorex Support Team
User avatar
Support Team
Site Admin
 
Posts: 4837
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria


Return to Automation API

Who is online

Users browsing this forum: No registered users and 0 guests