Salut je fais de la capture video lors de la premiere capture tout va bien ,mais lorsque que je close ma fenetre qui contient la panelVideo et que je veux la Show une deuxieme fois une erreur apparait "la valeur n'est pas comprise dans la plage attendu"

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

privatevoid Configure()
{
try
{
if (comboBox1.Items.Count < 1)
thrownewException();
comboBox1.Enabled = false;
comboBox2.Enabled = false;
this.button1.Enabled = true;
this.VideoInput = this.InputOptions.VideoInputDevices[comboBox1.SelectedIndex];
if (comboBox2.Items.Count > 0)
this.AudioInput = this.InputOptions.AudioInputDevices[comboBox2.SelectedIndex];
this.CaptureInfo = newCapture(this.VideoInput, this.AudioInput);
this.CaptureInfo.PreviewWindow = pictureBox1;
this.CaptureInfo.RenderPreview(); // LA LIGNE QUI LEVE L EXCEPTION
this.CaptureInfo.FrameCaptureComplete += newCapture.FrameCapHandler(CaptureInfo_FrameCaptureComplete);
this.button2.Enabled = true;
this.button1.Enabled = false;
}
catch(Exception e)
{
this.ErrorMessage(e);
}
}
MERCI D AVANCE