// Since a new PlayerForm is instantiated for every break, place these listeners here and forward the message // Invoke is necessary since form controls may only be accessed from the form's thread, but VLC has its own thread public static void OnMediaEndReached(object sender, EventArgs e) { if (PlayerForm != null && PlayerForm.IsDisposed == false) { PlayerForm.Invoke(new Action(() => { PlayerForm.OnMediaEndReached(sender, e); })); } }