Video in VB 6

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

    Video in VB 6

    Can someone give exact code for playing a video with Windows Media Player in VB 6. I asked this once before, and was told to put the following code in the Form Load...

    wmp = name of the component
    wmp.url = path of the video

    I loaded the Windows Media Player (named WindowsMediaPla yer1) onto the form.
    I then placed the following code in the Form Load...

    wmp = WindowsMediaPla yer1
    wmp.url = "H:\Photos & Videos\SimpsonV ideoClips\video 114.mpeg"

    VB6 would not accept the first line of code, so I changed the second line to

    WindowsMediaPla yer1.url = "H:\Photos & Videos\SimpsonV ideoClips\video 114.mpeg"
    (all one line)

    It accepted this line of code, but when I ran the program, the player said it was ready, but would not play it. Clicking the PLAY button did nothing.

    What am I doing wrong?
    Thanks.
  • Ali Rizwan
    Banned
    Contributor
    • Aug 2007
    • 931

    #2
    Originally posted by dingo
    Can someone give exact code for playing a video with Windows Media Player in VB 6. I asked this once before, and was told to put the following code in the Form Load...

    wmp = name of the component
    wmp.url = path of the video

    I loaded the Windows Media Player (named WindowsMediaPla yer1) onto the form.
    I then placed the following code in the Form Load...

    wmp = WindowsMediaPla yer1
    wmp.url = "H:\Photos & Videos\SimpsonV ideoClips\video 114.mpeg"

    VB6 would not accept the first line of code, so I changed the second line to

    WindowsMediaPla yer1.url = "H:\Photos & Videos\SimpsonV ideoClips\video 114.mpeg"
    (all one line)

    It accepted this line of code, but when I ran the program, the player said it was ready, but would not play it. Clicking the PLAY button did nothing.

    What am I doing wrong?
    Thanks.
    Hello
    Just add WindowsMediaPla yer component and add it on form.
    now add code for url
    your video will be played.
    remember just add wmpcomponent

    Comment

    Working...