wallstreetkid
Programmer
The printwindow function isnt working for me. Here is my code, could someone please tell me what is wrong with it?
Private Sub CaptureScreen(ByVal f As Control)
screen = New Bitmap(f.Width, f.Height)
Dim g As Graphics = Graphics.FromImage(screen)
Dim hdc As IntPtr = g.GetHdc
PrintWindow(f.Handle, hdc, Nothing)
g.ReleaseHdc(hdc)
g.Flush()
g.Dispose()
PictureBox1.Image = screen
End Sub
Private Sub CaptureScreen(ByVal f As Control)
screen = New Bitmap(f.Width, f.Height)
Dim g As Graphics = Graphics.FromImage(screen)
Dim hdc As IntPtr = g.GetHdc
PrintWindow(f.Handle, hdc, Nothing)
g.ReleaseHdc(hdc)
g.Flush()
g.Dispose()
PictureBox1.Image = screen
End Sub