I am using C# .NET to take a screenshot of the contents of a second monitor and display it in a windows on the primary screen.
The code I have is:
screenShotGraphics.CopyFromScreen(
Screen.AllScreens[screen].Bounds.X,
Screen.AllScreens[screen].Bounds.Y,
0,
0,
Screen.AllScreens[screen].Bounds.Size,
CopyPixelOperation.SourceCopy);
This works quite well when it is triggered by a button click, because the slight delay is not noticeable, however when it is run automatically (say every few seconds) the user can easily notice their mouse 'lock up' for a few seconds.
Obviously that's not ideal. So is there a faster way to perform this operation? (Or a way to perform it without interrupting mouse movements or interactivity?