04-15-2006, 12:07 PM
Hi I am working on a program that takes pictures of the screen when a certian key is hit. I have a panel with the color set to the forms transparency color. You can see throught he panel and what is in the background. I tryed saving the panels background image but it just turns up a black image with nothing. Does anyone know of a way to do this.
04-15-2006, 12:31 PM
Hitting the Prt Scrn key at any time while in Windows will take a screenshot and place it on the clipboard.
04-15-2006, 12:52 PM
If you use 2005 then this will work (copyfromscreen wraps bitblt)
Dim b As New Bitmap(Me.Panel1.Width, Me.Panel1.Height)
Dim g As Graphics = Graphics.FromImage(b)
Dim p As Point = Me.Panel1.PointToScreen(New Point(0, 0))
g.CopyFromScreen(p, New Point(0, 0), New Size(Panel1.Width, Panel1.Height))
otherwise you'll have to use bitblt directly.