views:

22

answers:

0

Hi,

first a disclaimer, I'm a java programmer and have almost null idea about the windows api. So please bear with me.

My goal is to use Java to capture a hidden window. My target platform is windows. I do understand that the robot class is used for capuring the visible part of the screen. After some browsing, I came across these three links which seem to be relevant:

www.support.teamdev.com/thread/1930, www.tech-archive.net/Archive/Development/microsoft.public.win32.programmer.ui/2006-02/msg00204.html, and www.fengyuan.com/article/wmprint.html

JxCapture is as bloodily expensive as Feng Yuan article is complicated. My question is thus, if the gurus in this forum can help me find a reasonable solution. The approach suggested in JxCapture does not seem to be overly complex. any hints? A visual basic script or some C# code that does this would be a good starting point.

I was in the believe that when the window is hidden, if I send a keypress event or a mouse press event to it, it would force it to redraw itself and hence allow itself to be captured even by java.awt.Robot. That was an illusion and it doesn't work.

On the other hand, the message in the JxCapture thread is from the year 2006; could it be that Sun has included such a feature since then and I'm just not aware of it?

Thanks, Klaus.