By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,115 Members | 898 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,115 IT Pros & Developers. It's quick & easy.

Capturing a panel when its form is minimized

P: n/a
Hi,

does someone know, if it's possible capturing the content of a panel, when
its form has state "minimized"?

Details:
A panel contains a Webbrowser object (AxSHDocVw.AxWebBrowser). My actual
application automatically navigates to some websites, makes a screenshot
and transforms them into small thumbnails. At the moment I'm using the
imported function BitBlt from gdi32.dll. This solutions only works, if the
form has state "normal" and is visible in the front of the screen.

But what I want, is an "invisible" solution, because the user should be not
constricted, while he's working.

Any ideas?

Thanks in advance,
Carsten.
Nov 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
I've never actually done this, but you may want to look at using virtual
desktops. I don't know exactly how this works, but my understanding is you
can have a virtual (invisible) desktop where the app runs and then you would
be able to do this stuff "off screen" in a sense.

But you can't do it minimized at all. If the app is minimized, then there's
no web browser window (there is, but not a visible one, and therefore the
window isn't actually getting painted) and if there's no web browser window,
there's nothing to get a screenshot of, which is basically what you're doing
with BitBlt.

Pete

"Carsten Klotz" <no****@nomail.com> wrote in message
news:15******************************@40tude.net.. .
Hi,

does someone know, if it's possible capturing the content of a panel, when
its form has state "minimized"?

Details:
A panel contains a Webbrowser object (AxSHDocVw.AxWebBrowser). My actual
application automatically navigates to some websites, makes a screenshot
and transforms them into small thumbnails. At the moment I'm using the
imported function BitBlt from gdi32.dll. This solutions only works, if the
form has state "normal" and is visible in the front of the screen.

But what I want, is an "invisible" solution, because the user should be
not
constricted, while he's working.

Any ideas?

Thanks in advance,
Carsten.

Nov 17 '05 #2

P: n/a
Am Fri, 30 Sep 2005 17:18:10 -0500 schrieb Pete Davis:
I've never actually done this, but you may want to look at using virtual
desktops. I don't know exactly how this works, but my understanding is you
can have a virtual (invisible) desktop where the app runs and then you would
be able to do this stuff "off screen" in a sense.
Thank you, Pete.

Due to the fact, that the final application should be a console based
application, I'm virtually forced dealing with virtual controls.
But you can't do it minimized at all. If the app is minimized, then there's
no web browser window (there is, but not a visible one, and therefore the
window isn't actually getting painted) and if there's no web browser window,
there's nothing to get a screenshot of, which is basically what you're doing
with BitBlt.


That could be the main reason, why it's not possible getting a working HWND
reference of that AX control (casting to IntPtr results in an unknown
error). I've tested PrintWindow() and WM_Print - also without success.
Anyway PrintWindow() was able capturing the blank, underlying panel on a
minimized form / window.

Maybe someone knows, if it's possible printing the page content like with a
"send to printer"-command, catching the output and converting that data to
a valid bitmap object...

I'm new in C# and thought "Give it a try" and realized quickly, that C# is
a serious alternative. Especially PInvoke seems to be a walk in the park
for an old hand at Java programming...

Best regards,

Carsten



Nov 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.