Using GDI+ to BitBlt the contents of a form to a JPG / JPEG.
Using BitBlt however only captures active portion of the form. If you want to do this in the "backgroun" or for a hidden form, look into using
PrintWindow API through P/Invoke.
Screen Capturing a Form in .NET - Using GDI and GDI