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. Playing Video with windows media player in C#

Playing Video with windows media player in C#

Scheduled Pinned Locked Moved C#
csharptutorialquestion
8 Posts 4 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.
  • K Offline
    K Offline
    kharr1027
    wrote on last edited by
    #1

    I was wondering if anyone knows how to play a video with windows media player in C#. i got the player loaded onto my form but i cann't figure out how to tell it what video to play. any ideals:confused:? thanks kevin

    E M 2 Replies Last reply
    0
    • K kharr1027

      I was wondering if anyone knows how to play a video with windows media player in C#. i got the player loaded onto my form but i cann't figure out how to tell it what video to play. any ideals:confused:? thanks kevin

      E Offline
      E Offline
      eric feng
      wrote on last edited by
      #2

      SetURL to your video file name. eric feng www.infospec.com

      K 1 Reply Last reply
      0
      • K kharr1027

        I was wondering if anyone knows how to play a video with windows media player in C#. i got the player loaded onto my form but i cann't figure out how to tell it what video to play. any ideals:confused:? thanks kevin

        M Offline
        M Offline
        Meysam Mahfouzi
        wrote on last edited by
        #3

        Do a bit search on www.microsoft.com, you will find a good tutorial about how to use it in VB.Net, you can use the same code in c#.


        Don't forget, that's

        Persian Gulf

        not Arabian gulf!

        K 1 Reply Last reply
        0
        • E eric feng

          SetURL to your video file name. eric feng www.infospec.com

          K Offline
          K Offline
          kharr1027
          wrote on last edited by
          #4

          What url? where at?:confused:

          E 1 Reply Last reply
          0
          • M Meysam Mahfouzi

            Do a bit search on www.microsoft.com, you will find a good tutorial about how to use it in VB.Net, you can use the same code in c#.


            Don't forget, that's

            Persian Gulf

            not Arabian gulf!

            K Offline
            K Offline
            kharr1027
            wrote on last edited by
            #5

            thanks that helped so much. what do you think i did before i posted this message? i searched for a good hour with out any luck on finding anything that made sense to me. :(

            M L 2 Replies Last reply
            0
            • K kharr1027

              thanks that helped so much. what do you think i did before i posted this message? i searched for a good hour with out any luck on finding anything that made sense to me. :(

              M Offline
              M Offline
              Meysam Mahfouzi
              wrote on last edited by
              #6

              I did a bit search and this is what I found: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwmt/html/vb_player_article.asp[^] I hope this helps:rose:


              Don't forget, that's

              Persian Gulf

              not Arabian gulf!

              1 Reply Last reply
              0
              • K kharr1027

                What url? where at?:confused:

                E Offline
                E Offline
                eric feng
                wrote on last edited by
                #7

                Player.AutoStart = true; Player.URL = "c:\movie.avi"; eric feng www.infospec.com

                1 Reply Last reply
                0
                • K kharr1027

                  thanks that helped so much. what do you think i did before i posted this message? i searched for a good hour with out any luck on finding anything that made sense to me. :(

                  L Offline
                  L Offline
                  Leon van Wyk
                  wrote on last edited by
                  #8

                  You need to check what version you are using becauce the commands changed completely between the two? If you have installed media player 9 it will over write the exiting componet the came with VS. Here is a sample of the older version which I think is the one that you have got! private AxMediaPlayer.AxMediaPlayer VideoScreen; VideoScreen = new AxMediaPlayer.AxMediaPlayer(); string FullPathAndFileName = @"C:\MyVideo.avi"; VideoScreen.FileName = FullPathAndFileName; VideoScreen.Play(); Hope this helped Leon v Wyk

                  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