首页上一页 1 下一页尾页 1 条记录 1/1页
《视频学Visual Basic》的“项目开发实战A 多媒体播放器”运行出错
发表在VB答疑区
2011-02-14
是否精华
是
否
版块置顶:
是
否
运行源程序"多媒体播放器.vbp"时,提示“实时错误'5':无效的过程调用或参数”,按调试按钮,显示位置如下内容中的下划线部分(红色部分):
Public Sub ShowLRC()
Dim fN As String '定义文件名
Dim iNum As Integer '存储文件扩展名的长度
If Frm_PlayList.Lvw_PlayList.ListItems.Count = 0 Then
Exit Sub
Else
fN = Frm_PlayList.List1.List(Frm_PlayList.Lvw_PlayList.selectedItem.Index - 1)
iNum = Len(GetExtension(fN))
fN = Left(fN, Len(fN) - iNum) & "lrc"
List1.Clear
Picture1.Visible = False
If LyricsAnalyse(fN) = True Then
Dim i As Integer
For i = 0 To 7
List1.AddItem " "
Next i
For i = 0 To UBound(Lyric)
[font color=#FF0000] [u] List1.AddItem Space(8) & Right(Lyric(i), Len(Lyric(i)) - 10)
[/font][/u] Next i
For i = 0 To 7
List1.AddItem " "
Next i
Else
Picture1.Visible = True
Lbl_FileName.Caption = SongName(fN)
End If
End If
End Sub
麻烦解决,谢谢!!
Public Sub ShowLRC()
Dim fN As String '定义文件名
Dim iNum As Integer '存储文件扩展名的长度
If Frm_PlayList.Lvw_PlayList.ListItems.Count = 0 Then
Exit Sub
Else
fN = Frm_PlayList.List1.List(Frm_PlayList.Lvw_PlayList.selectedItem.Index - 1)
iNum = Len(GetExtension(fN))
fN = Left(fN, Len(fN) - iNum) & "lrc"
List1.Clear
Picture1.Visible = False
If LyricsAnalyse(fN) = True Then
Dim i As Integer
For i = 0 To 7
List1.AddItem " "
Next i
For i = 0 To UBound(Lyric)
[font color=#FF0000] [u] List1.AddItem Space(8) & Right(Lyric(i), Len(Lyric(i)) - 10)
[/font][/u] Next i
For i = 0 To 7
List1.AddItem " "
Next i
Else
Picture1.Visible = True
Lbl_FileName.Caption = SongName(fN)
End If
End If
End Sub
麻烦解决,谢谢!!