Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

downloader für webbrowser

Empfohlene Antworten

Veröffentlicht

ich hab mir mal nen downloader geschrieben

mein problem ist das ich zwar den link für die datei reinkopiere aber er macht nichts das programm wird einfach geschlossen

was ist an dem code falsch

freu mich auf antworten die mir helfen

der code und das bild des programmes :

Imports System.Net

Public Class Form1

    Public WithEvents download As WebClient

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        FolderBrowserDialog1.ShowDialog()

        TextBox2.Text = FolderBrowserDialog1.SelectedPath

    End Sub


    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

        download = New WebClient

        download.DownloadFileAsync(New Uri(TextBox1.Text), TextBox2.Text)

    End Sub


    Private Sub download_DownloadFileCompleted(ByVal sender As Object, ByVal e As System.ComponentModel.AsyncCompletedEventArgs) Handles download.DownloadFileCompleted

        Label3.Text = "Download ist abgeschlossen"

        Me.Close()

    End Sub


    Private Sub download_DownloadProgressChanged(ByVal sender As Object, ByVal e As System.Net.DownloadProgressChangedEventArgs) Handles download.DownloadProgressChanged

        ProgressBar1.Value = e.ProgressPercentage

        Label4.Text = e.ProgressPercentage & "%"

        Label3.Text = e.BytesReceived

    End Sub

End Class

post-63143-144304484241_thumb.jpg

Vllt. musst du den WebClient im Konstruktor der Form zuweisen und immer mit dem einen Objekt arbeiten.

Grüße, JasonDelife.

Könnte es evtl. sein, dass WebClient die Events nicht im GUI-Thread feuert?

Dann ist der Fehler klar: Du darfst dann nicht auf Controls zugreifen oder musst (Begin)Invoke nutzen.

Grüße, JasonDelife.

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.