Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
Klik! DockLib.Net for Windows Forms
 Klik! Software Forum : Klik! DockLib.Net for Windows Forms
Subject Topic: Screenshot of hidden panel with ActiveX Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
skafoelix
Newbie
Newbie


Joined: July 15 2009
Location: Germany
Posts: 2
Posted: July 15 2009 at 2:26am | IP Logged Quote skafoelix

Hi!

I'm currently looking for a good Docking Library and I like yours a lot.
But I have a very specific requirement which none of the currently available libraries, including yours seem to support.

I need to be able to take a screenshots of all tabs in a container including those that are not visible.
This by itself is not a problem and can simply be done by calling the DrawToBitmap method which every System.Windows.Forms.Control supports. But the problems start to occur when using ActiveX controls on those tabs which I make extensive use of. The DrawToBitmap method doesn't support ActiveX controls. There's simply a white rectangle in place of the control.

There are methods available in the WinAPI which support taking screenshots of Windows that are not visible and it doesn't matter what controls are on the Window. The PrintWindow http://www.pinvoke.net/default.aspx/user32/PrintWindow.html function for example supports that. But it doesn't work with your library. If I try to use it on a control hosted in a DockContainer I just get a black image.

So my question is, do you know of a way to take screenshots of all the tabs hosted in a DockContainer including those with ActiveX controls?
Or is this something you could implement in your library?

As much as I would love to use your library I can't do without the functionality.

Thx for your time.
Felix
Back to Top View skafoelix's Profile Search for other posts by skafoelix
 
Klik! Support
Admin Group
Admin Group
Avatar

Joined: October 01 2003
Location: Turkey
Posts: 313
Posted: July 15 2009 at 2:40am | IP Logged Quote Klik! Support

Hello Felix,

Thank you very much for your interest first of all...

The feature you request is actually not related with our library which I'm sure you'll agree. We did a quick search and found out that DrawToBitmap and PrintWindow functions are actually sending WM_PRINT message to the window that you are taking the screenshot and again it seems that most (or maybe all) of the ActiveX controls do not implement that message or do not receive it thus you are getting a black rectangle as a result.

I'm afraid that we don't have any workaround for that case and it seems that your only solution is to make them visible and take a screenshot as usual.

Sorry for not being able to help in that case and please let us know if you have any further questions...



__________________
Best Regards,

Klik! Support Team
Back to Top View Klik! Support's Profile Search for other posts by Klik! Support
 
skafoelix
Newbie
Newbie


Joined: July 15 2009
Location: Germany
Posts: 2
Posted: July 15 2009 at 3:43am | IP Logged Quote skafoelix

Yeah, I agree that it's not directly related to your library.

Well, the problem with PrintWindow is different to the DrawToBitmap problem.
When I use DrawToBitmap the resulting image contains every control that is hosted in the container but any ActiveX control will be displayed just as a white rectangle. No matter if the tab is active or not.
When I use PrintWindow on the active tab it contains every control including ActiveX controls. Perfect! But when I try to use it on a not-active tab the whole image comes out black. No matter if there's an ActiveX control or not.

So there seems to be a difference in the two functions. If I could combine those two, the output would be perfect.

I ask you because if you could implement this functionality into your library you'd have something none of the other libraries have. So you create a new window class that when hosted in one of your tab containers could display the content of all the tabs. Just like in IE8, Opera or Safari.
Back to Top View skafoelix's Profile Search for other posts by skafoelix
 
Klik! Support
Admin Group
Admin Group
Avatar

Joined: October 01 2003
Location: Turkey
Posts: 313
Posted: July 15 2009 at 4:22am | IP Logged Quote Klik! Support

Hello Felix,

Ah, yes, probably, the PrintWindow API uses the same way as capturing the visible objects in screen.

I'm afraid there is not much we can do as we are bound with exposed windows functions as everbody else does.

Sorry again.

 



__________________
Best Regards,

Klik! Support Team
Back to Top View Klik! Support's Profile Search for other posts by Klik! Support
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum

Powered by Web Wiz Forums version 7.6
Copyright ©2001-2003 Web Wiz Guide

This page was generated in 0.1406 seconds.