Is it possible, or is there a way to do a screen capture of an image displayed withing PB? Maybe there is a library function that will do it?
Any help welcomed.
Alan
Screen capture
-
- Enthusiast
- Posts: 252
- Joined: Fri Feb 20, 2004 5:43 pm
Not amazingly sure what you wanted, but this code should grab your whole pb window and save it as a bmp in the folder where the source/exe is.
If this isnt what you wanted, then maybe a few more details would be helpful.
Code: Select all
#Screenshotimage=50
sourcedc=GetDC_(WindowID())
CreateImage(#Screenshotimage,WindowWidth(),WindowHeight())
UseImage(#Screenshotimage)
destdc=StartDrawing(ImageOutput())
BitBlt_(destdc,0,0,WindowWidth(),WindowHeight(),sourcedc,0,0,#SRCCOPY)
StopDrawing()
SaveImage(#Screenshotimage,"screenshot.bmp")
GreenGiant, many thanks for your comments and code. It looks as if it can be done. I will have a closer look at the code later.
Yes, I should have been a little more expicit !
I will have an opaque image of say 100 x 100 pixels with a transparent layer of the same size on top. I want to capture both layers as if they were one, ie what the eye sees.
Hope this helps.
Alan
Yes, I should have been a little more expicit !
I will have an opaque image of say 100 x 100 pixels with a transparent layer of the same size on top. I want to capture both layers as if they were one, ie what the eye sees.
Hope this helps.
Alan