public void Start() { ThreadExitSignaled = false; UInt32 Result = VideoCapture.CallBeginVideoCapture(WindowHandle, WholeWindow, X, Y, Width, Height, BitRate, FrameRate, Audio, Filename); if (Result == 0) { VideoCaptureStarted = true; VideoCaptureAttempted = true; } else { VideoCaptureAttempted = true; return; } while (!ThreadExitSignaled) { VideoCapture.CallCaptureVideoFrame(); } VideoCapture.CallStopVideoCapture(); }