geting the formshot

Hello,

Is it possible to take a window (form) screenshot in windows xp by reading it's canvas property and will that work if the window is mimimized or covered by another window? I know that you can draw on a form's canvas, read the content and store it as a bitmap and also by reading the canvas of the entire desktop you can get a screenshot, but can you get a formshot?

you can use BitBlt() function if you have handle of source canvas,
but when form is not shown or minimized you will not be able to take its snapshot
canvas contents are not stored all the time form is painted when becomes visible thru Paint method
(defined in TCustomControl) when control recives WM_PAINT message

Ok, thanks, that could be solved by intercepting WM_MINIMIZE or something like that and taking the formshot just before. But do you know if it would work if the window is under another window? I know that when you drag another window over a form it clears that area of a form, but it gets repainted... I also find it strange that googleing for formshots returns nothing special.