Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Take screenshot of Windows E4 rcp application window(Take screenshot of Windows E4 rcp application window)
Take screenshot of Windows E4 rcp application window [message #1104541] Sun, 08 September 2013 14:59 Go to next message
bava 502 is currently offline bava 502Friend
Messages: 6
Registered: August 2013
Junior Member

I am developing one application based on RCP and after a button click from the app i need to take a screen shot of the application window. I have done below for this:

GC gc = new GC(getShell().getDisplay());

final Image image = new Image(getShell().getDisplay(),getShell().getBounds());
gc.copyArea(image, getShell().getBounds().x,getShell().getBounds().y);

ImageLoader loader = new ImageLoader(); = new ImageData[]{image.getImageData()};
File imageFile = new File(fileName);,SWT.IMAGE_PNG);


I am able to take screen shot and save it with the above code but its behavior is same as windows "Print screen". Whatever is displaying on the screen it is capturing that image. For example, If i click capture button from my RCP window and immediately minimize it then my desktop image is captured but not the RCP app window.How to capture RCP window even if it is minimized(no focus). Please help
Re: Take screenshot of Windows E4 rcp application window [message #1104624 is a reply to message #1104541] Sun, 08 September 2013 18:02 Go to previous message
Erdal Karaca is currently offline Erdal KaracaFriend
Messages: 853
Registered: July 2009
Senior Member
Did you try Control.print(GC)? - Shell is a subclass of Control.
Previous Topic:Toolbar not visible with 4.3 legacy mode
Next Topic:CTabFolder Issue seen with E4?
Goto Forum:

Current Time: Mon Mar 30 11:27:04 GMT 2020

Powered by FUDForum. Page generated in 0.01305 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top