C# App video control
-
Hi! I'm writing an WinForm app in c# with VS2002 on win2000sp3 with mediaplayer9. I have a Windows Media Player control that I added to my controlsbox by going into the COM controls tab. This winmedplayer is embedded in the WinForm, much like the 'Play' button, of course. The problem I have is that whenever the application starts, it creates an exterior Windows Media Player window that then loads the video and plays it in its own window. My application just sits there behind with its own embedded media control that doesn't do anything. Here is the code for the load event of th app.:
private void frmMain_Load(object sender, System.EventArgs e) { string location; location = "C:\\Documents and Settings\\Administrateur\\Mes documents\\My Work\\Recherche et Developpement\\Videos et Audios\\Vidéo\\Q.AVI"; axWinMedPlayer.openPlayer(location); }
So my question is: how may I play the video in the Windows Media Control that is embedded on my Windows Form? -instead of having it played in a new Windows Media Player window independant of my app winform... Thanks! :) Antoine This by our hands that dream, "I shall find a way or make one!" -
Hi! I'm writing an WinForm app in c# with VS2002 on win2000sp3 with mediaplayer9. I have a Windows Media Player control that I added to my controlsbox by going into the COM controls tab. This winmedplayer is embedded in the WinForm, much like the 'Play' button, of course. The problem I have is that whenever the application starts, it creates an exterior Windows Media Player window that then loads the video and plays it in its own window. My application just sits there behind with its own embedded media control that doesn't do anything. Here is the code for the load event of th app.:
private void frmMain_Load(object sender, System.EventArgs e) { string location; location = "C:\\Documents and Settings\\Administrateur\\Mes documents\\My Work\\Recherche et Developpement\\Videos et Audios\\Vidéo\\Q.AVI"; axWinMedPlayer.openPlayer(location); }
So my question is: how may I play the video in the Windows Media Control that is embedded on my Windows Form? -instead of having it played in a new Windows Media Player window independant of my app winform... Thanks! :) Antoine This by our hands that dream, "I shall find a way or make one!"If you look at the documentation for
openPlayer
, it states that the media is opened in a new window. This is supposed to happen. Instead, assign the media source to the URL property for WM9. You shoudl also download the Windows Media 9 SDK. It has a pretty good CHM with all sorts of information about embedding the player as well as the object model.-----BEGIN GEEK CODE BLOCK----- Version: 3.21 GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++ -----END GEEK CODE BLOCK-----
-
If you look at the documentation for
openPlayer
, it states that the media is opened in a new window. This is supposed to happen. Instead, assign the media source to the URL property for WM9. You shoudl also download the Windows Media 9 SDK. It has a pretty good CHM with all sorts of information about embedding the player as well as the object model.-----BEGIN GEEK CODE BLOCK----- Version: 3.21 GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++ -----END GEEK CODE BLOCK-----
Thanks! I dont really know what I did, but now it works. And for now, that's enough for me. I'll dig in later, thans! Antoine (prononced Antwone) This by our hands that dream, "I shall find a way or make one!"