.Cgi datei Downloaden und in .jpg umwandeln

  • VB.NET

Es gibt 1 Antwort in diesem Thema. Der letzte Beitrag () ist von SystemUnknow.

    .Cgi datei Downloaden und in .jpg umwandeln

    Hallo Leute

    Ich bin grade dabei Bilder einer Webcam zu speichern und diese im Ordner eines PC zu speichern. Hier mein Code aber die Datei hat 0kb und kann nicht aufgerufen werden.. :(

    VB.NET-Quellcode

    1. Dim Webcam1 As Integer = 0
    2. Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
    3. If (Webcam1 < 90000) Then
    4. If (My.Computer.FileSystem.FileExists(Application.StartupPath & "\Webcam1\" & "Bild" & Webcam1 & ".jpg")) Then
    5. My.Computer.FileSystem.DeleteFile(Application.StartupPath & "\Webcam1\" & "Bild" & Webcam1 & ".jpg")
    6. End If
    7. My.Computer.Network.DownloadFile("http://xx.xxx.xx/snapshot.cgi", Application.StartupPath & "\Webcam1\"& "Bild" & Webcam1 & ".jpg")
    8. Webcam1 += 1
    9. Else
    10. Webcam1 = 0
    11. If (My.Computer.FileSystem.FileExists(Application.StartupPath & "\Webcam1\" & "Bild" & Webcam1 & ".jpg")) Then
    12. My.Computer.FileSystem.DeleteFile(Application.StartupPath & "\Webcam1\" & "Bild" & Webcam1 & ".jpg")
    13. End If
    14. My.Computer.Network.DownloadFile("http://xx.x.x.x.x/snapshot.cgi", Application.StartupPath & "\Webcam1\"& "Bild" & Webcam1 & ".jpg")
    15. Webcam1 += 1
    16. End If


    Aber ihrgendwie geht es nicht bitte umrat.