Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. C# App video control

C# App video control

Scheduled Pinned Locked Moved C#
questioncsharpcomhardwarehelp
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    antoine orchus tech
    wrote on last edited by
    #1

    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!"

    H 1 Reply Last reply
    0
    • A antoine orchus tech

      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!"

      H Offline
      H Offline
      Heath Stewart
      wrote on last edited by
      #2

      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-----

      A 1 Reply Last reply
      0
      • H Heath Stewart

        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-----

        A Offline
        A Offline
        antoine orchus tech
        wrote on last edited by
        #3

        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!"

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups