Ciao ragazzi ho costruito un applicaizone che presenta un form contente un oggetto axWindowsMediaPlayer e DataGridView che cambiano attraverso output esterni.
Il video cambia N volte senza problemi mentre nella GridView ogni tanto(random) compare una grossa X rossa.
Cosa protrebbe essere?
Posto il codice sottostante.
public Form1()
{
Video workerObject;
Thread workerThread;
InitializeComponent();
workerObject = new Video(this);
workerObject.axWindowsMediaPlayer1 = axWindowsMediaPlayer1;
workerObject.DataGridView1 = dataGridView1;
workerThread = new Thread(workerObject.DoWork);
workerThread.Start();
}
public class Video
{
public void DoWork()
{
while(true)
{
.....
axWindowsMediaPlayer1.URL = newURL;
axWindowsMediaPlayer1.Ctlcontrols.play();
DataGridView1.DataSource = source;
}
}
}