This is a class i\'m using to capture my screen and mouse cursour as screenshot. But i want to make somehow that if the Form is in the middle of the screen don\'t capture it
Um.. Hide the form?
this.Visible = false;
and THEN run the screenshot method.
Like this:
protected Bitmap TakeScreenshot(bool cursor)
{
Bitmap bitmap;
this.Visible = false;
bitmap = CaptureScreen(cursor);
this.Visible = true;
return bitmap;
}
and use it in your code the way you wanted:
private void timer1_Tick(object sender, EventArgs e)
{
using (bitmap = (Bitmap)ScreenCapture.TakeScreenshot(true))
{
ffmp.PushFrame(bitmap);
}
}