Results 1 to 7 of 7
  1. #1
    Join Date
    Apr 2006
    Posts
    20

    Unanswered: play movie file pathway

    i have a field in my database that stores the pathway of a movie
    i need to have a button to play that movie
    how can i do that???

  2. #2
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    one possibility is to shell a movie viewer.

    private sub myneededbutton_click()
    dim strShell as string
    strShell = "c:\path\path\myViewer.exe " & pathway
    Call Shell(strShell, vbNormalFocus)


    exact syntax in strShell will depend on what comand line parameters your viewer demands/accepts. i don't play with movies so i can't be any more explicit than that.

    izy
    currently using SS 2008R2

  3. #3
    Join Date
    Apr 2006
    Posts
    20

    didnt work

    thanks for your prompt reply
    i tried it but it always give me invalid argument error

  4. #4
    Join Date
    Apr 2006
    Posts
    20

    Anyone

    Anyone??
    for more ideas??

  5. #5
    Join Date
    Dec 2005
    Posts
    45
    Can you post the code you used?

  6. #6
    Join Date
    Apr 2006
    Posts
    20
    It is the same as the one IZY supplied here in my thread

  7. #7
    Join Date
    Feb 2004
    Posts
    90
    I couldn't get izyrider's code to work, if there is a space in either of the pathways (the media player pathway and the movie pathway). If there are spaces in the pathways you need to add double-quotes (Chr(34)) around both pathways:

    Code:
    Dim VideoFullPath As String
    Dim strShell As String
    strShell = Chr(34) & "C:\Program Files\Windows Media Player\wmplayer.exe" & Chr(34) & " " & Chr(34) & pathway & Chr(34)
    Call Shell(strShell, vbNormalFocus)
    The above code sets the movie to play in Windows Media Player.

    Have a look at the attachment for an example db.
    Attached Files Attached Files

Posting Permissions

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