#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2002
    Posts
    7
    Rep Power
    0

    Opening a video file from Borland C++ Builder


    Hello,

    Im trying to have a video file open when i click on a button. I can get it working by adding an .AVi file, but the file is so small you can barely see it or it says cannot open avi. The other thing i tried was system("1.avi") which opens the file in media player but only seems to work on the computer which it was compiled even though the avi is stored in the same directory as the exe.

    Anybody any ideas?
  2. #2
  3. Banned ;)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Location
    Woodland Hills, Los Angeles County, California, USA
    Posts
    9,638
    Rep Power
    4247
    Have you tried using the TMediaPlayer Component on the System tab.
  4. #3
  5. Banned ;)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Location
    Woodland Hills, Los Angeles County, California, USA
    Posts
    9,638
    Rep Power
    4247
    Alternatively, you can also import Microsoft's Windows Media Player component into C++ Builder. To do this, do the following:

    1. Close All projects (File --> Close All)
    2. Go to Component-->Import Active X Control
    3. In the box that pops up, scroll down to the bottom and pick "Windows Media Player" and click the Add button
    4. In the Class Names list box, if it says TMediaPlayer, change it to TMediaPlayer2 (so it won't conflict with the existing TMediaPlayer component). If it says TWindowsMediaPlayer, you can leave it alone if you like
    5. Click on Install
    6. Now you should see it ask to rebuild dclusr.dpk. Go ahead and rebuild it.
    7. You should now see the component installed on the Active-X components tab.

    Now you can close this project and open your project. Then drop the component you just created, on to your form and size as needed.
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2002
    Posts
    7
    Rep Power
    0
    thanx m8, that got it working
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2012
    Location
    Buffalo, NY
    Posts
    1
    Rep Power
    0

    Opening a video file from Borland C++ Builder


    Hey Scorpion,

    It's over 9 years since you posted those instructions, and I just want you to know that your time and consideration was EXTREMELY helpful to this dinosaur programmer trying to enter the 21st century! I tried to send a private message but was prohibited from doing so (I am registered).

    My thanks to you and to this forum.

    -Stu

    Comments on this post

    • Scorpions4ever agrees : You're welcome
  10. #6
  11. Banned ;)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Location
    Woodland Hills, Los Angeles County, California, USA
    Posts
    9,638
    Rep Power
    4247
    You're welcome sir. Glad you found that post useful :).
    Up the Irons
    What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
    "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
    Down with Sharon Osbourne

    "I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo

IMN logo majestic logo threadwatch logo seochat tools logo