用VB做realplayer播放列表

       Realplayer的列表播放,利用一个REALPLAYER的路径来实现的,在标准EXE窗体上,放置一个REALAUDIO1,和commondialog1,加二个按钮,LIST1命名为lstItems,一个按钮命名为添加文件,一个按钮为保存列表,在添加文件中加入下如代码: 

Private Sub Command1_Click()
Dim sTmp As String
  Dim strfix As String
  Dim i As Integer
  Dim yy As String
  CommonDialog1.ShowOpen
  sTmp = CommonDialog1.FileName
  If Len(sTmp) = 0 Then Exit Sub
  For i = 1 To Len(sTmp)
  strfix = Mid(sTmp, i, 1)
  If strfix = "/" Then
  strfix = "/"
  End If
  yy = yy & strfix
  Next i
  sTmp = "File://" & yy
 lstItems.AddItem sTmp

end sub

Private Sub Command2_Click()
Dim s As Integer
CommonDialog1.DialogTitle = "输入要保存的RM文件"
CommonDialog1.Filter = "RealPlayer播放列表(*.RM)|*.RM"
CommonDialog1.ShowSave
If Len(CommonDialog1.FileName) = 0 Then
Exit Sub
End If
Open CommonDialog1.FileName For Output As #1
For s = 0 To Me.lstItems.ListCount - 1
Print #1, Me.lstItems.List(s)
Next s
realaudio.source=commondialog.filename

realaudio.doplay

End Sub

Private Sub Form_Load()
realaudio1.controls="imagewindow"

End Sub

如加上删除或移动文件,增加一些,修改一点,并可实现呀!

2002。1。1

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值