private void OnCaputeStarted() { buttonStart.Enabled = false; buttonStop.Enabled = true; devicesPanel.Enabled = false; videoForm = new VideoForm { BackColor = Color.Black, StartPosition = FormStartPosition.CenterScreen, ClientSize = new Size(640, 480), //ClientSize = videoResoulution, }; windowHandle = videoForm.VideoHandle; videoForm.Paint += VideoForm_Paint; videoForm.SizeChanged += VideoForm_SizeChanged; videoForm.FormClosed += VideoForm_FormClosed; timer.Enabled = true; videoForm.Visible = true; }
private void CloseVideo() { if (videoForm != null) { videoForm.Close(); videoForm = null; } }