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. Integrating the Media Player

Integrating the Media Player

Scheduled Pinned Locked Moved C#
csharpcomhelpquestionlearning
7 Posts 3 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.
  • Y Offline
    Y Offline
    Yonaz
    wrote on last edited by
    #1

    Hi everyone i am trying to code a program that should be able to play videos besides other features. I thought it would be easiest to accomplish the task by just integrating the Windows Media Player-COM-Object, but i couldn't get the controls to disappear (i want my own user-interface..). I read about mediaplayer-integration in a book called 'Advanced C# Programming' by Paul Kimmel. But he seemed to use a different com-object and the demo-app to that chapter doesn't compile (can't find the reference to AxMediaPlayer). The only COM-object i found, that looks like it has really something to do with the mediaplayer is this: AxWMPLib.AxWindowsMediaPlayer. But with this one i get these nasty mediaplayer-controls that i can't get rid of. Can anybody help me with this, or does somebody know a better solution? thanks in advance

    Y 1 Reply Last reply
    0
    • Y Yonaz

      Hi everyone i am trying to code a program that should be able to play videos besides other features. I thought it would be easiest to accomplish the task by just integrating the Windows Media Player-COM-Object, but i couldn't get the controls to disappear (i want my own user-interface..). I read about mediaplayer-integration in a book called 'Advanced C# Programming' by Paul Kimmel. But he seemed to use a different com-object and the demo-app to that chapter doesn't compile (can't find the reference to AxMediaPlayer). The only COM-object i found, that looks like it has really something to do with the mediaplayer is this: AxWMPLib.AxWindowsMediaPlayer. But with this one i get these nasty mediaplayer-controls that i can't get rid of. Can anybody help me with this, or does somebody know a better solution? thanks in advance

      Y Offline
      Y Offline
      Yonaz
      wrote on last edited by
      #2

      i just downloaded the media player 9 SDK and tried to compile the c#-sample (named tune-clipper). As written i registered the wmppia.dll with regasm.exe and installed it with gacutil.exe (Global Assembly Cache Utility). This seemed to be successful. But as i tried to compile the tuneclipper i stumbled accross compile-errors (actually 18 of the same kind): D:\dev\SDKs\WMSDK\WMPSDK9\samples\dotNet\csharp\Form1.cs(689): 'AxMicrosoft.MediaPlayer.Interop.AxWindowsMediaPlayer' does not contain a definition for 'controls' I get this one when a call to Player.controls.xxx is made. Player is defined as 'private AxMicrosoft.MediaPlayer.Interop.AxWindowsMediaPlayer'. Player.controls seems to be undefined.. very strange.. (i guess Microsoft-code is supposed to run..) Does anybody know a way out?

      P 1 Reply Last reply
      0
      • Y Yonaz

        i just downloaded the media player 9 SDK and tried to compile the c#-sample (named tune-clipper). As written i registered the wmppia.dll with regasm.exe and installed it with gacutil.exe (Global Assembly Cache Utility). This seemed to be successful. But as i tried to compile the tuneclipper i stumbled accross compile-errors (actually 18 of the same kind): D:\dev\SDKs\WMSDK\WMPSDK9\samples\dotNet\csharp\Form1.cs(689): 'AxMicrosoft.MediaPlayer.Interop.AxWindowsMediaPlayer' does not contain a definition for 'controls' I get this one when a call to Player.controls.xxx is made. Player is defined as 'private AxMicrosoft.MediaPlayer.Interop.AxWindowsMediaPlayer'. Player.controls seems to be undefined.. very strange.. (i guess Microsoft-code is supposed to run..) Does anybody know a way out?

        P Offline
        P Offline
        polomint
        wrote on last edited by
        #3

        I'm not sure but I think the you may use the property 'uiMode'. Valid values are "none", "mini", and "full"... eg... wmp1.uiMode = "none"; Also.. If you don't want the context menu for the Windows Media Control , use wmp1.enableContextMenu = false; // true to turn it back on Hope that helps.. Yippee Kai Yai Signed Polomint.......

        Y 1 Reply Last reply
        0
        • P polomint

          I'm not sure but I think the you may use the property 'uiMode'. Valid values are "none", "mini", and "full"... eg... wmp1.uiMode = "none"; Also.. If you don't want the context menu for the Windows Media Control , use wmp1.enableContextMenu = false; // true to turn it back on Hope that helps.. Yippee Kai Yai Signed Polomint.......

          Y Offline
          Y Offline
          Yonaz
          wrote on last edited by
          #4

          Yup, thanks. does your mediaplayer have the 'controls'-property? As i wrote, mine somehow doesn't. Without it i can't really control media-files. All the play-, stop- and pause-methods are in there.

          A P 2 Replies Last reply
          0
          • Y Yonaz

            Yup, thanks. does your mediaplayer have the 'controls'-property? As i wrote, mine somehow doesn't. Without it i can't really control media-files. All the play-, stop- and pause-methods are in there.

            A Offline
            A Offline
            Anonymous
            wrote on last edited by
            #5

            I've just checked for the controls property and I do have it. wmp.Controls( int index ); I assume that the index is the index of the play/pause controls etc. Are you using Visual Studio? I use VS2003, and all I do is add the Windows Media Player COM component to the toolbox, then use it. HTH John

            1 Reply Last reply
            0
            • Y Yonaz

              Yup, thanks. does your mediaplayer have the 'controls'-property? As i wrote, mine somehow doesn't. Without it i can't really control media-files. All the play-, stop- and pause-methods are in there.

              P Offline
              P Offline
              polomint
              wrote on last edited by
              #6

              Damn, my post was hijacked by Anonymous !!!! :-D I've just checked for the controls property and I do have it. wmp.Controls( int index ); I assume that the index is the index of the play/pause controls etc. Are you using Visual Studio? I use VS2003, and all I do is add the Windows Media Player COM component to the toolbox, then use it. HTH John Yippee Kai Yai Signed Polomint.......

              Y 1 Reply Last reply
              0
              • P polomint

                Damn, my post was hijacked by Anonymous !!!! :-D I've just checked for the controls property and I do have it. wmp.Controls( int index ); I assume that the index is the index of the play/pause controls etc. Are you using Visual Studio? I use VS2003, and all I do is add the Windows Media Player COM component to the toolbox, then use it. HTH John Yippee Kai Yai Signed Polomint.......

                Y Offline
                Y Offline
                Yonaz
                wrote on last edited by
                #7

                damn hijackers ;) I use VS2003, too. At first i just integrated the mediaplayer in my toolbox like you. But as i found out i didn't have that controls-interface in my mediaplayer (but the microsoft-one has) i downloaded the SDK. I still can't compile their sample-app. Btw: I have a Controls-interface.. but not the one that microsoft in the sample uses ;) . But i can't type wmp.Controls(myindex); because in my VS2003 it's not a method.. In the microsoft-sample it's also written lowercase ('controls') and it has functions like play, stop and pause. This friggin thing is starting to go on my nerves.. why can't it just work as it's supposed to be.. or at least as the help tells me it works..

                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