Results 1 to 5 of 5

Thread: How to use Windows Media Player Control

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2002
    Location
    Malaysia
    Posts
    21

    How to use Windows Media Player Control

    hi guys,

    i was wondering how do u use the windows media player control in VB codes

    let's say i want to play a file in a certain location on my comp.

    what codes would i need?

    thx guys

  2. #2
    Frenzied Member cyborg's Avatar
    Join Date
    May 2000
    Location
    Sweden
    Posts
    1,755
    Create a new project.
    Press CTRL+T and check 'Windows Media Player'.

    Then add a control to the program.

    To open a file do this:
    MediaPlayer1.FileName = "C:\YourFile.avi"

    To play it:
    MediaPlayer1.Play

    you can use 'stop' and 'pause' and alot of other stuff...
    Check out the FAQ and do a search before you post.
    My tutorials: Anti-Alias Pixels, Accurate Game Loop, Resource File

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Mar 2002
    Location
    Malaysia
    Posts
    21
    well here's the second problem..

    i'm using the windows media player 9 control and it doesn't seem to have the filename, play, pause or even stop methods....

    is there something i need?
    like the windows media player 9 sdk or some additional steps before i begin using the control?


    thx for the help

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Mar 2002
    Location
    Malaysia
    Posts
    21
    oh heh
    found it

    u just have to put

    media1.controls.<play/pause/anything u want>

    i suppose it's a lil different from the earlier windows media player controls

  5. #5
    Frenzied Member cyborg's Avatar
    Join Date
    May 2000
    Location
    Sweden
    Posts
    1,755
    Yep...
    Check out the FAQ and do a search before you post.
    My tutorials: Anti-Alias Pixels, Accurate Game Loop, Resource File

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width