Does anyone have any insight as to what can cause a scenario where if you were to call
mediaControl.Run();
that it won’t actually start rendering video until this is called
MessageBox.Show("");
I couldn’t figure out why the media wasn’t running even when getstate returned that it was running until i return the HRESULT which said sure its running… but only displays video on the window when a messagebox is shown.
The weird thing is that if you dismiss the messagebox, and rendering pauses… but if you called it again say 5 seconds after, it continue to works.
Furthermore… if you dismiss the messagebox and have a continous loop right after it that sleeps the thread indefinitely, it continues to render.
I have been banging my head all day with this trying to figure out why a messagebox is key… but ultimately, I can’t have a messagebox display.
Any random ideas would be helpful too… thanks.
Cheers.
The main thing MessageBox.Show() does is to run the message loop. You may be able to replace it with simulated
DoEvents()(see this answer)But there probably is a serious problem in your code surrounding this.