用VB做realplayer播放列表

[入库:2005年8月18日] [更新:2007年3月24日]

本文简介:选择自 beyondxb 的 blog

       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

本文关键:用VB做realplayer播放列表
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top