begin process at 2010 02 10 02:01:30
  Trouver un code source :
 
dans
 
Accueil > 

Code

 > 

Multimedia

 > LECTEUR MP3

LECTEUR MP3


 Information sur la source

Note :
7 / 10 - par 3 personnes
7,00 / 10

  • 1

  • 2

  • 3

  • 4

  • 5

  • 6

  • 7

  • 8

  • 9

  • 10
Catégorie :Multimedia Classé sous :lecteurmp3 Niveau :Débutant Date de création :18/11/2001 Vu / téléchargé :6 982 / 856

Auteur : ShadowMan

Ecrire un message privé
Site perso
Commentaire sur cette source (0)
Ajouter un commentaire et/ou une note

 Description

Un petit lecteur MP3 qui utilise uindoze media player... Vous pouvez downloader le zip si vous voulez pas recopier tout le source...

Source

  • Dim min As Integer
  • Dim sec As Integer
  • Dim sec2 As Integer
  • Dim minplay As Integer
  • Dim secplay As Integer
  • Dim sec2play As Integer
  • Dim Seul As Boolean
  • Dim Namechar
  • Dim Indexchar
  • Dim pause As Boolean
  • Private Sub About_Click()
  • Form2.Show
  • End Sub
  • Private Sub Command1_Click()
  • If pause = True Then
  • MediaPlayer1.Play
  • Else
  • MediaPlayer1.FileName = List1.Text
  • If MediaPlayer1.FileName = "" Then
  • Exit Sub
  • Else
  • MediaPlayer1.Play
  • Slider1.Max = MediaPlayer1.Duration
  • Timer1.Enabled = True
  • Timer2.Enabled = True
  • End If
  • pause = False
  • End If
  • End Sub
  • Private Sub Command10_Click()
  • 'MediaPlayer1.FileName = List1.Text
  • 'MediaPlayer1.CurrentPosition = MediaPlayer1.Duration - 2
  • 'Timer3.Enabled = True
  • 'MediaPlayer1.Play
  • End Sub
  • Private Sub Command2_Click()
  • pause = True
  • MediaPlayer1.pause
  • End Sub
  • Private Sub Command3_Click()
  • MediaPlayer1.Stop
  • MediaPlayer1.CurrentPosition = 0
  • End Sub
  • Private Sub Command4_Click()
  • On Error Resume Next
  • If List1.Text = "" Then
  • Exit Sub
  • Else
  • List1.ListIndex = List1.ListIndex - 1
  • MediaPlayer1.FileName = List1.Text
  • Slider1.Max = MediaPlayer1.Duration
  • MediaPlayer1.Play
  • End If
  • End Sub
  • Private Sub Command5_Click()
  • On Error Resume Next
  • If List1.Text = "" Then
  • Exit Sub
  • Else
  • List1.ListIndex = List1.ListIndex + 1
  • MediaPlayer1.FileName = List1.Text
  • Slider1.Max = MediaPlayer1.Duration
  • MediaPlayer1.Play
  • End If
  • End Sub
  • Private Sub Command6_Click()
  • On Error GoTo Erreur
  • dlgop.Filter = "Tous les fichiers (*.*)|*.*|Fichiers Audio MPEG (*.MP3, *.MP2) | *.MP3; *.MP2 | Fichiers Audio (*.wav, *.wma, *.snd)|*.wav; *.wma; *.snd|Fichier MIDI (*.mid, *.rmi, *.midi)|*.mid; *.rmi; *.midi"
  • dlgop.FilterIndex = 2
  • dlgop.ShowOpen
  • List1.AddItem (dlgop.FileName)
  • Erreur:
  • Exit Sub
  • End Sub
  • Private Sub Command7_Click()
  • If List1.Text <> "" Then
  • List1.RemoveItem (List1.ListIndex)
  • Else
  • Exit Sub
  • End If
  • End Sub
  • Private Sub Command8_Click()
  • Namechar = List1.Text
  • Indexchar = List1.ListIndex - 1
  • If List1.Text <> "" Then
  • If List1.ListIndex <> 0 Then
  • List1.RemoveItem List1.ListIndex
  • List1.AddItem Namechar, Indexchar
  • List1.Text = Namechar
  • Else
  • Exit Sub
  • End If
  • End If
  • End Sub
  • Private Sub Command9_Click()
  • If List1.Text <> "" Then
  • If List1.ListIndex <> List1.ListCount - 1 Then
  • Namechar = List1.Text
  • Indexchar = List1.ListIndex + 1
  • List1.RemoveItem List1.ListIndex
  • List1.AddItem Namechar, Indexchar
  • List1.Text = Namechar
  • Else
  • Exit Sub
  • End If
  • End If
  • End Sub
  • Private Sub Form_Load()
  • Label2.Caption = "0:00 / 0:00"
  • End Sub
  • Private Sub List1_DblClick()
  • If pause = True Then
  • MediaPlayer1.Play
  • Else
  • MediaPlayer1.FileName = List1.Text
  • If MediaPlayer1.FileName = "" Then
  • Exit Sub
  • Else
  • Timer2.Enabled = True
  • End If
  • MediaPlayer1.Play
  • If MediaPlayer1.Duration < 1 Then
  • Slider1.Max = 1
  • Else
  • Slider1.Max = MediaPlayer1.Duration
  • Timer1.Enabled = True
  • End If
  • End If
  • End Sub
  • Private Sub Quit_Click()
  • Unload Me
  • End
  • End Sub
  • Private Sub Slider1_Scroll()
  • MediaPlayer1.CurrentPosition = Slider1.Value
  • End Sub
  • Private Sub Slider2_Scroll()
  • MediaPlayer1.Volume = "-" & Slider2.Value
  • Slider2.Text = ""
  • End Sub
  • Private Sub Timer1_Timer()
  • Slider1.Value = MediaPlayer1.CurrentPosition
  • If MediaPlayer1.CurrentPosition = MediaPlayer1.Duration Then
  • If List1.ListIndex = List1.ListCount - 1 Then
  • MediaPlayer1.Stop
  • Exit Sub
  • Else
  • List1.ListIndex = List1.ListIndex + 1
  • MediaPlayer1.FileName = List1.Text
  • Slider1.Max = MediaPlayer1.Duration
  • MediaPlayer1.Play
  • End If
  • Else
  • Exit Sub
  • End If
  • End Sub
  • Private Sub Timer2_Timer()
  • minplay = Int(MediaPlayer1.Duration / 60)
  • secplay = Int(minplay * 60)
  • sec2play = Int(MediaPlayer1.Duration - secplay)
  • If sec2play < 10 Then
  • Seul = False
  • Else
  • Seul = True
  • End If
  • min = Int(MediaPlayer1.CurrentPosition / 60)
  • sec = Int(MediaPlayer1.CurrentPosition / 60) * 60
  • sec2 = Int(MediaPlayer1.CurrentPosition - sec)
  • If Seul = True Then
  • If sec2 < 10 Then
  • Label2.Caption = min & ":0" & sec2 & " / " & minplay & ":" & sec2play
  • Else
  • Label2.Caption = min & ":" & sec2 & " / " & minplay & ":" & sec2play
  • End If
  • Else
  • If sec2 < 10 Then
  • Label2.Caption = min & ":0" & sec2 & " / " & minplay & ":0" & sec2play
  • Else
  • Label2.Caption = min & ":" & sec2 & " / " & minplay & ":0" & sec2play
  • End If
  • End If
  • End Sub
  • Private Sub Timer3_Timer()
  • MediaPlayer1.CurrentPosition = MediaPlayer1.CurrentPosition - 1
  • End Sub
Dim min As Integer
Dim sec As Integer
Dim sec2 As Integer
Dim minplay As Integer
Dim secplay As Integer
Dim sec2play As Integer
Dim Seul As Boolean
Dim Namechar
Dim Indexchar
Dim pause As Boolean

Private Sub About_Click()
Form2.Show
End Sub

Private Sub Command1_Click()
If pause = True Then
MediaPlayer1.Play
Else
    MediaPlayer1.FileName = List1.Text
        If MediaPlayer1.FileName = "" Then
        Exit Sub
        Else
           MediaPlayer1.Play
    Slider1.Max = MediaPlayer1.Duration
    Timer1.Enabled = True
    Timer2.Enabled = True
    End If
    pause = False
        End If
End Sub

Private Sub Command10_Click()
'MediaPlayer1.FileName = List1.Text
'MediaPlayer1.CurrentPosition = MediaPlayer1.Duration - 2
'Timer3.Enabled = True
'MediaPlayer1.Play
End Sub

Private Sub Command2_Click()
pause = True
    MediaPlayer1.pause
End Sub

Private Sub Command3_Click()
    MediaPlayer1.Stop
    MediaPlayer1.CurrentPosition = 0
End Sub

Private Sub Command4_Click()
On Error Resume Next
        If List1.Text = "" Then
        Exit Sub
        Else
        List1.ListIndex = List1.ListIndex - 1
        MediaPlayer1.FileName = List1.Text
            Slider1.Max = MediaPlayer1.Duration
            MediaPlayer1.Play
        End If
End Sub

Private Sub Command5_Click()
On Error Resume Next
        If List1.Text = "" Then
        Exit Sub
        Else
            List1.ListIndex = List1.ListIndex + 1
            MediaPlayer1.FileName = List1.Text
            Slider1.Max = MediaPlayer1.Duration
            MediaPlayer1.Play
        End If
End Sub

Private Sub Command6_Click()
On Error GoTo Erreur
    dlgop.Filter = "Tous les fichiers (*.*)|*.*|Fichiers Audio MPEG (*.MP3, *.MP2) | *.MP3; *.MP2 | Fichiers Audio (*.wav, *.wma, *.snd)|*.wav; *.wma; *.snd|Fichier MIDI (*.mid, *.rmi, *.midi)|*.mid; *.rmi; *.midi"
    dlgop.FilterIndex = 2
    dlgop.ShowOpen
        List1.AddItem (dlgop.FileName)
Erreur:
    Exit Sub
End Sub

Private Sub Command7_Click()
    If List1.Text <> "" Then
        List1.RemoveItem (List1.ListIndex)
    Else
    Exit Sub
    End If
End Sub

Private Sub Command8_Click()
    Namechar = List1.Text
    Indexchar = List1.ListIndex - 1
        If List1.Text <> "" Then
            If List1.ListIndex <> 0 Then
                List1.RemoveItem List1.ListIndex
                    List1.AddItem Namechar, Indexchar
                List1.Text = Namechar
            Else
                Exit Sub
            End If
        End If
End Sub

Private Sub Command9_Click()
    If List1.Text <> "" Then
        If List1.ListIndex <> List1.ListCount - 1 Then
            Namechar = List1.Text
                Indexchar = List1.ListIndex + 1
                    List1.RemoveItem List1.ListIndex
                List1.AddItem Namechar, Indexchar
            List1.Text = Namechar
        Else
            Exit Sub
        End If
    End If
End Sub

Private Sub Form_Load()
    Label2.Caption = "0:00 / 0:00"
End Sub

Private Sub List1_DblClick()
        If pause = True Then
    MediaPlayer1.Play
        Else
            MediaPlayer1.FileName = List1.Text
                If MediaPlayer1.FileName = "" Then
                    Exit Sub
                Else
                    Timer2.Enabled = True
                End If
    MediaPlayer1.Play
                    If MediaPlayer1.Duration < 1 Then
                        Slider1.Max = 1
                    Else
                        Slider1.Max = MediaPlayer1.Duration
                        Timer1.Enabled = True
                    End If
        End If
End Sub

Private Sub Quit_Click()
    Unload Me
    End
End Sub

Private Sub Slider1_Scroll()
    MediaPlayer1.CurrentPosition = Slider1.Value
End Sub

Private Sub Slider2_Scroll()
    MediaPlayer1.Volume = "-" & Slider2.Value
    Slider2.Text = ""
End Sub

Private Sub Timer1_Timer()
    Slider1.Value = MediaPlayer1.CurrentPosition
        If MediaPlayer1.CurrentPosition = MediaPlayer1.Duration Then
                If List1.ListIndex = List1.ListCount - 1 Then
                    MediaPlayer1.Stop
                    Exit Sub
                Else
                    List1.ListIndex = List1.ListIndex + 1
                    MediaPlayer1.FileName = List1.Text
                    Slider1.Max = MediaPlayer1.Duration
                    MediaPlayer1.Play
                End If
                   Else
                   Exit Sub
                   End If
End Sub

Private Sub Timer2_Timer()
             minplay = Int(MediaPlayer1.Duration / 60)
    secplay = Int(minplay * 60)
    sec2play = Int(MediaPlayer1.Duration - secplay)
        If sec2play < 10 Then
            Seul = False
        Else
            Seul = True
        End If
    min = Int(MediaPlayer1.CurrentPosition / 60)
    sec = Int(MediaPlayer1.CurrentPosition / 60) * 60
    sec2 = Int(MediaPlayer1.CurrentPosition - sec)
    If Seul = True Then
        If sec2 < 10 Then
            Label2.Caption = min & ":0" & sec2 & " / " & minplay & ":" & sec2play
        Else
            Label2.Caption = min & ":" & sec2 & " / " & minplay & ":" & sec2play
        End If
    Else
            If sec2 < 10 Then
    Label2.Caption = min & ":0" & sec2 & " / " & minplay & ":0" & sec2play
        Else
    Label2.Caption = min & ":" & sec2 & " / " & minplay & ":0" & sec2play
    End If
    End If
End Sub

Private Sub Timer3_Timer()
    MediaPlayer1.CurrentPosition = MediaPlayer1.CurrentPosition - 1
End Sub
 


 Fichier Zip

Les Membres Club peuvent télécharger directement un fichier contenu dans le zip sans télécharger le zip en entier !

Télécharger le zip


 Sources du même auteur

Source avec Zip SAUVEGARDER SA CONTACT LIST ICQ
Source avec Zip CHAT À 2

 Sources de la même categorie

Source avec Zip Source avec une capture EASYSAMPLE : JOUER DES SONS (MP3, WAVE) DEPUIS UN CLAVIER MI... par bierman
Source avec Zip Source avec une capture Source .NET (Dotnet) EXTRACT' SOUND MP3 par dheroux
Source avec Zip Source avec une capture Source .NET (Dotnet) CAPTURE ET ENREGISTREMENT D'UNE IMAGE DEPUIS UNE WEBCAM par RENAUD34
Source avec Zip Source avec une capture FLVPLAYER+XML+TXT DYNAMIQUE+TILELIST+UILOADER par tranber78
Source avec Zip Source avec une capture LECTEUR AUDIO AVEC JAVAFX par puccino1er

Commentaires et avis

Aucun commentaire pour le moment.

 Ajouter un commentaire




Nos sponsors


Sondage...

Comparez les prix

CalendriCode

Février 2010
LMMJVSD
1234567
891011121314
15161718192021
22232425262728

Consulter la suite du CalendriCode

 
Développement réalisé par Nicolas SOREL (Nix) avec l'aide de : Cyril DURAND et Emmanuel (EBArtSoft), Merci à Vincent pour ses précieux conseils.
CodeS-SourceS.com© Toute reproduction même partielle est interdite sauf accord écrit du Webmaster
CodeS-SourceS.com© est une marque déposée tous droits réservés

Google Coop CodeS-SourceS Google Coop CodeS-SourceS
Temps d'éxécution de la page : 0,608 sec (4)

Nous contacter | Annoncer sur CodeS-SourceS | Mentions légales