video in VB6

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dingo
    New Member
    • Jun 2007
    • 7

    video in VB6

    Does anyone know how to show video in a VB6 program?
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    try using either the multimedia control or using the windows mediaplayer control from

    PROJECT->COMPONENTS.

    If u are using media player control its farely easy.

    but if u use mmcontrol you need to display the video in a picture box.

    Comment

    • slapshock
      New Member
      • Oct 2006
      • 57

      #3
      try to use the windows mediap player...it is quite easier than the other...
      just put this code in the form load..

      eg..
      wmp=name of the component

      wmp.url=(here is the path of the video you want ot play)



      or else just go to its properties and just simply add the path where the video is

      Comment

      • jeffbroodwar
        New Member
        • Oct 2006
        • 118

        #4
        Hi,

        I'll also recommend media player control.

        Tip : you can make splash screens with this video player. create an avi file and try to load it in media player control. cover the edges with labels and run it with progress bar. Tadah ! you'll have your splash screen !!!

        Regards,
        Jeff

        Comment

        • dingo
          New Member
          • Jun 2007
          • 7

          #5
          Originally posted by slapshock
          try to use the windows mediap player...it is quite easier than the other...
          just put this code in the form load..

          eg..
          wmp=name of the component

          wmp.url=(here is the path of the video you want ot play)



          or else just go to its properties and just simply add the path where the video is

          OK...I'm just dense. If I want the video (named video114) to play in a picture box (named Picture1), the video is located at H:\Photos&Video s\SimpsonVideoC lips
          and I want it to play when I click a button, what's the code??? Thanks.

          Comment

          • jeffbroodwar
            New Member
            • Oct 2006
            • 118

            #6
            Hi Dingo,

            I'm sorry but i think what your trying to do is a bit unusual..... because picture boxes are used to display graphics/images.... not to play video files.. i'm not sure though... if it's possible it'll be amazing... ^^

            Best regards,
            Jeff

            Comment

            • dingo
              New Member
              • Jun 2007
              • 7

              #7
              Originally posted by jeffbroodwar
              Hi Dingo,

              I'm sorry but i think what your trying to do is a bit unusual..... because picture boxes are used to display graphics/images.... not to play video files.. i'm not sure though... if it's possible it'll be amazing... ^^

              Best regards,
              Jeff
              One of the replies to my question said to put the following code in the form load..

              wmp = name of the component
              wmp.url = (here is the path of the video you want to play)

              This is too cryptic for a total novice.

              What exactly is the component? Do I need to load Windows Media Player into my program?? How?
              And, how do I get the video to actually play? I want it to play when I click a button.

              And...is there a good book that actually explains this stuff in English?
              Many thanks!!

              Comment

              • slapshock
                New Member
                • Oct 2006
                • 57

                #8
                Originally posted by dingo
                One of the replies to my question said to put the following code in the form load..

                wmp = name of the component
                wmp.url = (here is the path of the video you want to play)

                This is too cryptic for a total novice.

                What exactly is the component? Do I need to load Windows Media Player into my program?? How?
                And, how do I get the video to actually play? I want it to play when I click a button.

                And...is there a good book that actually explains this stuff in English?
                Many thanks!!

                add the windows media player control in your components

                Comment

                • vdraceil
                  New Member
                  • Jul 2007
                  • 236

                  #9
                  Originally posted by dingo
                  One of the replies to my question said to put the following code in the form load..

                  wmp = name of the component
                  wmp.url = (here is the path of the video you want to play)

                  This is too cryptic for a total novice.

                  What exactly is the component? Do I need to load Windows Media Player into my program?? How?
                  And, how do I get the video to actually play? I want it to play when I click a button.

                  And...is there a good book that actually explains this stuff in English?
                  Many thanks!!
                  So you've finally learnt to add a video file in a form...
                  If u dont mind can you explain it more clearly to me?

                  Comment

                  • Killer42
                    Recognized Expert Expert
                    • Oct 2006
                    • 8429

                    #10
                    I'm a bit surprised nobody mentioned the Animation control, which can play AVI files. It is often used to play the little animations indicating a copy is in progress, and so on.

                    Oops! Sorry, here's some interesting info from the online help...
                    The control can play only AVI files that have no sound. In addition, the Animation control can display only uncompressed .avi files or .avi files that have been compressed using Run-Length Encoding (RLE).

                    So, very handy for those little Windows animations, but probably no use at all for "real" video.

                    Comment

                    • Robbie
                      New Member
                      • Mar 2007
                      • 180

                      #11
                      Heh-heh... this has gotta be the 4th time I'm recommending people to use MCI! :D

                      Here we go...

                      Using the Multimedia Control Interface (MCI) you can play any video file or sound file (including even sound from a video file!) which you can play on WMP, but without using or needing to have WMP!
                      As long as you have the codec for a file, it can play it - So as well as the common WAVs and MP3s and AVIs, you also could even play OGG audio and MKV video!

                      It does not load the entire file into memory either! Because of that, it's been able to play a 12-hour-45-minute file almost instantly as soon as it receives the command to.

                      It is compatible with versions of Windows as early as 98, possibly even 95.

                      Here's a link to a topic in which I described in detail how to use MCI, and some of its useful features:

                      Comment

                      Working...