j'ai modifier mon logiciel:

voici mes codes:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
| Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
AxShockwaveFlash1.Movie = TextBox1.Text
Dim linkportions() As String
If (TextBox1.Text.IndexOf("youtube") <> -1) And (TextBox1.Text.IndexOf("watch?v=") <> -1) Then
linkportions = Split(TextBox1.Text, "watch?v=")
AxShockwaveFlash1.Movie = linkportions(0) & "v/" & linkportions(1)
Else
MessageBox.Show("entrer un lien valide")
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Timer1.Start()
Dim type As String = ComboBox1.Text
If ComboBox1.Text = "" Then
MsgBox("No file type selected")
Else
End If
MsgBox(TextBox1.Text + "converted into a " + type + " file.")
Dim oldFile As String = Mid(TextBox1.Text, 1, Len(TextBox1.Text) - 4)
FileCopy(TextBox1.Text, oldFile + type)
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
ProgressBar1.Increment(1)
Label1.Text = ProgressBar1.Value.ToString + " %"
If ProgressBar1.Value = 99 Then
MsgBox("TELECHARGEMENT TERMINER")
Timer1.Enabled = False
ProgressBar1.Value = 0
End If
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Me.Close()
End Sub
End Class |
un fois que j'ai sélectionner une vidéo youtube qui m’intéresser, je click sur télécharger en choisissent le format de la vidéo que je voulais . mais il m'affiche une erreur a la fin du téléchargement:
erreur:
FileCopy(TextBox1.Text, oldFile + type)
et aussi comment on fait pour envoyer convection (mp3,mp4...etc) terminer dans le dossier Musique.
merci
cordialement shreck59
Partager