노래재생바의 오류를 정확히 알았습니다..
보물선
일단 첫번째 노래가 3분 : 30초의 노래고두번째 노래가 3분 : 10초 의 노래라고 치면
첫번째 노래가 재생되고 재생바가 3분 30초까지 갑니다.잘되구요두번째 노래가 재생되면 3분 10초인데 3분 10초까지 가서 재생바가 끝가지가야하는데
3분 30초에서 다음으로 넘어가니 3분 30초의 슬라이더바가 값이 계속 지정되잇는지
3분 10초 지점에서 끝나되 나머지 20초부분은 빈공간으로 됩니다.
반대로
3분 10초의 노래를 먼저 하고 하면 3분10초까지 재생바가끝가지 잘갑니다근데 3분 30초의 노래를 하면 3분 10초에서 재생바가 끝나버려서 20초가 안되니 오류가 나버립니다.
소스 아래 동봉합니다..몇번이고 해결해봣지만 어디부분이 오류인지 모르겠습니다..
Private Sub Check3_Click()If Check3.Value = 1 ThenMsgBox 한곡반복재생을 멈추시려면 체크를 해제하신후 멈추시면 됩니다., vbInformation, 한곡재생ElseEnd IfEnd Sub
Private Sub Command1_Click()
CD1.Filter = 재생가능한파일|*.mp3;*.wav|모든파일|*.*CD1.CancelError = FalseCD1.Flags = cdlOFNAllowMultiselect Or cdlOFNExplorerCD1.ShowOpen
If LstCheck(List2, CD1.FileName) = True ThenMsgBox 이미 리스트에 있는 노래입니다., vbInformation, 중복Elseadd_ListEnd If
Frame1.Caption = 노래 목록 & List1.ListCount & 개
End SubFunction add_List()sFile = Split(CD1.FileName, Chr(0))If UBound(sFile) 0 ThenFor i = 1 To UBound(sFile)List1.AddItem sFile(i)List2.AddItem sFile(0) & \ & sFile(i)Next iElseList1.AdList1.AddItem Left(CD1.FileTitle, Len(CD1.FileTitle) - 4)List2.AddItem CD1.FileNameEnd IfEnd Function
Private Sub Command2_Click()
If List1.List(i) = ThenMsgBox 노래목록을 불러와 주시기 바랍니다., vbInformation, 목록Else
If WindowsMediaPlayer1.URL = ThenMsgBox 노래를 선택해 주시기 바랍니다, vbInformation, 선택ElseTimer1.Enabled = TrueIf Command2.Caption = ▶ ThenWindowsMediaPlayer1.Controls.playCommand2.Caption = ⅡCommand2.ToolTipText = 일시정지Timer2.Enabled = TrueElseIf Command2.Caption = Ⅱ ThenWindowsMediaPlayer1.Controls.pauseCommand2.ToolTipText = 재생Command2.Caption = ▶End IfEnd IfEnd IfEnd Sub
Private Sub Command3_Click()WindowsMediaPlayer1.Controls.stopTimer1.Enabled = FalseLabel1.Caption = 00:00/00:00Command2.Caption = ▶End Sub
Private Sub Command4_Click()On Error Resume NextList1.ListIndex = List1.ListIndex - 1List2.ListIndex = (List2.ListIndex - 1) + 1End Sub
Private Sub Command5_Click()
On Error Resume NextList1.ListIndex = List1.ListIndex + 1List2.ListIndex = (List2.ListIndex - 1) + 1
End Sub
Private Sub Command6_Click()List1.ClearList2.ClearFrame1.Caption = 노래 목록End Sub
Private Sub Command7_Click()On Error Resume NextList1.RemoveItem List1.ListIndexList2.RemoveItem List2.ListIndexEnd SubPrivate Sub Command9_Click()If Command9.Caption = ▶▶ ThenWindowsMediaPlayer1.Controls.fastForwardCommand9.Caption = ◀◀Command9.ToolTipText = 빨리감기정지Timer2.Enabled = TrueElseIf Command9.Caption = ◀◀ ThenCommand9.ToolTipText = 빨리감기WindowsMediaPlayer1.Controls.playCommand9.Caption = ▶▶End IfEnd SubPrivate Sub Slider1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)WindowsMediaPlayer1.settings.volume = Slider1.ValueEnd Sub
Private Sub Slider2_Change()WindowsMediaPlayer1.Controls.currentPosition = Slider2.ValueEnd Sub
Private Sub Timer2_Timer()
If Label1.Caption 00:00/00:00 ThenSlider2.Max = WindowsMediaPlayer1.currentMedia.durationTimer2.Enabled = FalseEnd If
End Sub
Private Sub WindowsMediaPlayer1_PlayStateChange(ByVal NewState As Long)
If Check1.Value = 1 Then
If NewState = wmppsMediaEnded ThenIf List1.ListCount = List1.ListIndex + 1 ThenList1.ListIndex = 0List2.ListIndex = 0Exit SubEnd IfList2.ListIndex = List1.ListIndex + 1WindowsMediaPlayer1.URL = List2.List(List2.ListIndex)End IfElseEnd If
If Check3.Value = 1 ThenOn Error Resume NextWindowsMediaPlayer1.Controls.playElse
If NewState = wmppsMediaEnded ThenIf List1.ListCount = List1.ListIndex + 1 ThenList1.ListIndex = 0List2.ListIndex = 0Timer1.Enabled = FalseLabel1.Caption = 00:00/00:00Command2.Caption = ▶Exit SubEnd IfList1.ListIndex = List1.ListIndex + 1List2.ListIndex = (List2.ListIndex - 1) + 1WindowsMediaPlayer1.URL = List2.List(List2.ListIndex)End IfLabel2.Caption = 재생 중인 음악 :End If
End Sub
Private Sub List1_Click()
List2.ListIndex = List1.ListIndexWindowsMediaPlayer1.URL = List2.List(List2.ListIndex)WindowsMediaPlayer1.Controls.stopCommand2.Caption = ▶
End SubFunction LstCheck(LstBox As ListBox, StrChk As String) As Boolean If LstBox.ListCount = 0 Then LstCheck = False Exit Function End IfDim i As IntegerFor i = 0& To LstBox.ListCount - 1& If LstBox.List(i) = StrChk Then LstCheck = True Exit Function End IfNext iLstCheck = FalseEnd Function
Private Sub Timer1_Timer()
Label1.Caption = WindowsMediaPlayer1.Controls.currentPositionString & / & WindowsMediaPlayer1.currentMedia.durationStringSlider2.SelStart = WindowsMediaPlayer1.Controls.currentPositionIf WindowsMediaPlayer1.playState = wmppsReady Then WindowsMediaPlayer1.Controls.playLabel2.Caption = 재생 중인 음악 : & List1.List(List1.ListIndex)
If Check2.Value = 1 ThenWindowsMediaPlayer1.settings.mute = TrueElseWindowsMediaPlayer1.settings.mute = FalseEnd IfEnd Sub
번호 | 제 목 | 글쓴이 | 날짜 |
---|---|---|---|
2696970 | text형식으로 저장할때 언어셋설정 질문!!! | 핫팬츠 | 2025-06-03 |
2696917 | sys우회 하는법 아시는분. . (1) | 촉촉한 초코칩 | 2025-06-03 |
2696883 | 비쥬얼베이직 스튜디오 6.0 파일 | 콩알눈 | 2025-06-02 |
2696854 | 윈웹 렉이 너무 심하네요 (1) | 팬지 | 2025-06-02 |
2696825 | 메이플스토리로그인(접속기) 소스오류, 해결바랍니다! | 키다리 | 2025-06-02 |
2696800 | 그누보드 multipart 게시글작성 (3) | HotPink | 2025-06-02 |
2696640 | 이 소스의 모듈좀 주세용 ;; | 파이팅 | 2025-05-31 |
2696591 | 다운프로그램 넣는법?? | 아놀드 | 2025-05-31 |
2696566 | 수정해도 그래요 ㅜㅜ 다시한번 제발 이것좀 해결해주세요 ㅜ | 하늘빛눈망울 | 2025-05-30 |
2696513 | 텍스트 활성 방법 좀... | 힘찬 | 2025-05-30 |
2696466 | ExitWindow함수로 컴퓨터 끄는 방법좀요 | 가장 | 2025-05-29 |
2696441 | 기억이안나서그런데 ㅠㅠ | 란새 | 2025-05-29 |
2696412 | 리스트뷰 에 체크 할수 있게 하는법좀요;;;ㅠ. | PinkPearl | 2025-05-29 |
2696380 | 질문이요 제발 답변좀요 ㅠㅠ | 은G | 2025-05-29 |
2696355 | 자동적용Q&A | 지음 | 2025-05-28 |
2696327 | 리스트 삭제 질문 | 힘찬 | 2025-05-28 |
2696300 | IF 문 질문합니다. | 볼1매그녀 | 2025-05-28 |
2696272 | 65535 크기의 배열에서 특정 부분만 읽는법 (1) | 소녀틳향기 | 2025-05-28 |
2696241 | winhttp 질문! 고수분들답변부탁드려요^ㅆ^ 주석달아주실수있는분! 오류해결 | 뿡뿡 | 2025-05-27 |
2696189 | 스크린샷에 글씨쓰기 (1) | 푸른마을 | 2025-05-27 |