

Using (Graphics g = Graphics.FromImage(b)) Using (Bitmap b = new Bitmap(CaptureSize.Width, CaptureSize.Height)) async Task MethodName(object e, ElapsedEventArgs args) await Task.Delay(interval, cancellationToken) public async Task PeriodicFooAsync(TimeSpan interval, CancellationToken cancellationToken) Protected override void OnClosing(CancelEventArgs e) Aborts the Thread On Form Close // Stops Crashing on Form CLose Private void Form1_Load(object sender, EventArgs e) Void FPS_TimerSec_Tick(object sender, EventArgs e)Ĭurrent_fps_label.Text = count_FPS.ToString() // Display FPS

Size CaptureSize = new Size(, ) īool Not_closed = true // Stop Work on CloseįPS_TimerSec = new () įPS_TimerSec.Tick += new EventHandler(FPS_TimerSec_Tick) Later I want to adjust the FPS so the screen can be recorded in different FPSs. I want to record the screen in 30 FPS and display the recording in real time in a PictureBox. I tried Task Run and Thread pool but cant get it to work properly. The best i got was 20 fps and it was not stable. I have tried a lot of things but nothing works properly. What is the best and easiest way to record the Screen using C# / Win Forms.
