我用数据库里的"歌名"和"歌曲位置"字段,传送到Mediaplay里播放,该怎么做???

解决方案 »

  1.   

    不过可以找到位置后用shellexecute 来运行它也是可以的
      

  2.   

    Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
     'hwnd -----------  Long,指定一个窗口的句柄,有时候,windows程序有必要在创建自己的主窗口前显示一个消息框
     ' lpOperation ----  String,指定字串“open”来打开lpFlie文档,或指定“Print”来打印它
      'lpFile ---------  String,想用关联程序打印或打开一个程序名或文件名
     ' lpParameters ---  String,如lpszFlie是可执行文件,则这个字串包含传递给执行程序的参数
      'lpDirectory ----  String,想使用的完整路径
     ' nShowCmd -------  Long,定义了如何显示启动程序的常数值。参考ShowWindow函数的nCmdShow参数Private Sub Command1_Click()
      Dim i As Long
      i = ShellExecute(0, "open", "i:\1boxer.WMV", vbNullString, vbNullString, 1)
    End SubPrivate Sub Command2_Click()
      Shell "i:\wmplayer.exe f:\歌名.mp3"
    End Sub
      

  3.   

    严重同意suntt(两条腿的狗)上面那位的意见!!
      

  4.   

    如果是网络的话是不可以这样的!应是:如果是c:\windows\01.dat就要改为:\\计算机名\c\windows\01.dat
      

  5.   

    在部件里选择Windows Media Player
    然后用法嘛,很简单,以看就会了。