private void btnCapture_Click(object sender, EventArgs e) { IsBusy = true; btnCapture.Enabled = txtURL.Enabled = !IsBusy; if (pbResult.Image != null) { pbResult.Image.Dispose(); pbResult.Image = null; } webpageCapture.CapturePage(txtURL.Text, new Size((int)nudWebpageWidth.Value, (int)nudWebpageWidth.Value)); }
private void StartCapture() { IsBusy = true; stopRequested = false; UpdateControls(); lock (this) { CleanPictureBox(); } webpageCapture.CaptureDelay = (int)nudCaptureDelay.Value * 1000; webpageCapture.CapturePage(txtURL.Text, new Size((int)nudWebpageWidth.Value, (int)nudWebpageWidth.Value)); }