2

Good day,

I would like to know if the .NET framework gives you a way to retrive the littles thumbnails Windows XP+ generates when you alt+tab.

The application I try to make should be able to get a window capture (ALT+PrtScr) of another Window that is not necessary Active and could be partially or completly hidden behind another one.

I tried the codes found there VB.NET Window Screen Capture (ALT+PRINTSCREEN) with no success in the case the window I'm trying to capture is not visible.

I do not believe that is possible to capture a hidden window. That's why I'm looking forward the windows generated thumbnails instead.

Anyone got a hint ?

Thank you in advance.

Community
  • 1
  • 1
Cybrix
  • 3,248
  • 5
  • 42
  • 61
  • 3
    Windows XP does not create thumbnail images of windows on Alt-Tab. – Adam Robinson Apr 07 '10 at 20:16
  • I know it doesn't but I have software installed at work that generates thumbnails on alt+tab under WinXP. I can't remember the name of it though. I dont know where that application generates the thumbnails from. Here is a capture http://www.wddb.info/stackoverflow/alttab.jpg Taken at work under WinXP Pro. – Cybrix Apr 07 '10 at 20:36
  • 1
    I found it: http://www.microsoft.com/windowsxp/Downloads/powertoys/Xppowertoys.mspx it's a bundles of diffefent littles plugins. How do they get those thumbnails from ? – Cybrix Apr 07 '10 at 20:46
  • Because all of those thumbnails are images of open application windows- how about getting all the handles for those windows and then using the handles to capture the window images? – Dostee Apr 08 '10 at 00:20
  • I tried to use the Win32 API to capture that window using the hWnd with no success. It only works when the window is on first plan. At home I'm developing under Vista with VB.NET Express. There should be a way to put the hand on those windows generated thumbnails under Vista. Like I said in my previous post, it's possible in XP too because the PowerToys plugins do it. – Cybrix Apr 08 '10 at 03:09
  • I have just noticed that the PowerToys saves the last state of the window and show it in the Alt+Tab replacement window. It is not a live representation of the window. So I guess I wont be able to do it under XP. I believe Vista do a live capture if I'm not mistaken. Any idea how I could get this work? – Cybrix Apr 08 '10 at 13:32
  • I have another solutions to my program. Is that possible to apply an Alpha filter to a given window handler ? All I want is to get a minimised capture of the given window and make it almost transparent on the side of the screen so I can work and not be disturbed by that window. Any ideas? – Cybrix Apr 17 '10 at 17:35
  • I found how I could apply Alpha to another Window. I also made the window WS_EX_TRANSPARENT Or WS_EX_NOACTIVATE so I can click through it. Now I want to know how to undo the flags to restore the window. I tried to copy the flags with GetWindowLong and restoring it after but it's not working. Any ideas how I could restore it? – Cybrix Apr 17 '10 at 19:11
  • Did the answer below help? What API's was it using? – ckg Mar 27 '12 at 19:20

1 Answers1

1

I know this might not be exactly what you are looking for but here Microsoft Powertoy Taskswitch that does exactly (as it sounds) what you are trying to do. You could us a disassembler to see what api's they are using to force drawing of those windows. If you would like help with that, let me know.

Jimmie Clark
  • 1,878
  • 13
  • 25