Question

  Asked: May 8 2008   9:45 AM GMT
  Asked by: Shwetha


how to open media fils?


VB6, DialogBox, Visual Basic 6

how to open media files using vb6 using dialogbox control please get me the codings to open and to read

Subscribe to Alerts! Get questions and answers delivered to your Inbox.


E-mail me updates on this question



   SUBSCRIBE

hidden modal window

Answer Wiki (Improve, edit or add to this answer)


 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0



You can do this in two ways:

    You add the Media Components and then pass the file name to the component
    You perform a shell command that will open Windows Media Player and passing the file path and name as argument



Example

Private Sub Command1_Click()
Dim path As String
Dim runExe As Double

path = "C:\Program files\Windows Media Player\wmplayer.exe"
runExe = Shell(path & " c:\mymusic\file.mp3", vbMaximizedFocus)
End Sub
  • AddThis Social Bookmark Button

Browse more Questions and Answers on Development.

Looking for relevant Development Whitepapers? Visit the SearchWinDevelopment.com Research Library.


Discuss This Answer


You must be logged-in to discuss a question. Log-in/Register