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..
Aber ihrgendwie geht es nicht bitte umrat.
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
- Dim Webcam1 As Integer = 0
- Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
- If (Webcam1 < 90000) Then
- If (My.Computer.FileSystem.FileExists(Application.StartupPath & "\Webcam1\" & "Bild" & Webcam1 & ".jpg")) Then
- My.Computer.FileSystem.DeleteFile(Application.StartupPath & "\Webcam1\" & "Bild" & Webcam1 & ".jpg")
- End If
- My.Computer.Network.DownloadFile("http://xx.xxx.xx/snapshot.cgi", Application.StartupPath & "\Webcam1\"& "Bild" & Webcam1 & ".jpg")
- Webcam1 += 1
- Else
- Webcam1 = 0
- If (My.Computer.FileSystem.FileExists(Application.StartupPath & "\Webcam1\" & "Bild" & Webcam1 & ".jpg")) Then
- My.Computer.FileSystem.DeleteFile(Application.StartupPath & "\Webcam1\" & "Bild" & Webcam1 & ".jpg")
- End If
- My.Computer.Network.DownloadFile("http://xx.x.x.x.x/snapshot.cgi", Application.StartupPath & "\Webcam1\"& "Bild" & Webcam1 & ".jpg")
- Webcam1 += 1
- End If
Aber ihrgendwie geht es nicht bitte umrat.