Getting a screenshot / canvas of a not visible form

Getting a screenshot / canvas of a not visible form

Post by Nils Krumre » Mon, 30 Jun 2003 07:11:38



Hi!
Perhaps someone can give me a quick idea on how to do the following:
I have two forms, one of which is currently active and in the
foreground, the second one is not visible/in the background.
I have managed to simply get a screenshot, but for that the form has
to be actually visible on the desktop. Is there a way of getting the
content of the second form into a bitmap, without having to display it
first? I tried using
DCDesk := GetWindowDC(Form2.Handle);
BitBlt(bmp.Canvas.Handle, 0, 0, Form2.Width, Form2.Height,
         DC, 0, 0, SRCCOPY);
but that only works when the Form is visible, otherwise the bitmap
returned is just plain white.

I'm grateful for any answer anyone might give...

Greetings,
     Nils.

 
 
 

Getting a screenshot / canvas of a not visible form

Post by Nils Krumre » Mon, 30 Jun 2003 07:51:00


Never mind, with some fiddling around and Form1.GetFormImage.Canvas I
managed to do what I wanted...

 
 
 

1. Capturing the Canvas of a Not-Visible(Hidden) Form or Component

I want to make some kind of transition before showing the next form in my
App.
I can capture the Screen of an active Form getting the DC with
GetDC(Form1.Handle), but when I try to do the same with a hidden form it
does not work.

What could I be missing?

2. Loading Icon from running application

3. Getting Pixel value of object not visible?

4. Form Canvas vs Image Canvas

5. can I copy form canvas to printer canvas ???

6. Screenshot of a form

7. refreshing visible part of a canvas.

8. LW 6.0 Screenshot??? (Not mine)

9. ScreenShot Contest / WIN FREE COPIES OF SCREENSHOT

10. dismiss Form.PopupMenu when Form1.Visible = False