![]()

Zitat
Hier nun die Frage:
Wie bzw. womit hast du es hinbekommen, das deine Menüs (zumindest bei mir) beim überfahren gelb hinterlegt sind

wie kann man den updater anders einstellen, das er von einer eigenen seite das update ausführt
|
|
Visual Basic Quellcode |
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 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
Public Class SoftwareUpdate Public WithEvents client As New Net.WebClient Dim z1 As String Dim z2 As String Dim Fertig As Boolean = False Private Sub SoftwareUpdate_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Label2.Text = "Aktuelle Version: " & Form1.Version End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim changelog As String Dim response As String If Button1.Text = "Auf Updates überprüfen" Then Button1.Enabled = False Status.Text = "Status: Es wird nach Updates gesucht..." ProgressBar1.Show() Try Dim client2 As New Net.WebClient Try response = client2.DownloadString("http://4typen.bplaced.net/update/version.txt") changelog = client2.DownloadString("http://4typen.bplaced.net/update/changelog.txt") z1 = Split(response, "|")(0) z2 = Split(response, "|")(1) Label3.Text = "Neuste Version: " & z1 Dim lblt As Integer = Form1.Version If lblt < z1 Then ProgressBar1.Hide() Status.Text = "Status: Update verfügbar!" Label4.Show() Label4.Text = "Es ist ein neues Update verfügbar! (Version " & z1 & ")" Button1.Text = "Update herunterladen" Button1.Enabled = True RichTextBox1.Text = changelog Me.Size = New Size(545, 598) Me.Location = New Point(Me.Location.X, Me.Location.Y - 100) Else ProgressBar1.Hide() Status.Text = "Status: Kein Update verfügbar." Label4.Show() Label4.Text = "Es ist kein Update verfügbar, sie haben die neuste Version." Button1.Text = "Fertigstellen" Button1.Enabled = True PictureBox2.Show() End If Catch MsgBox("Es ist ein Fehler aufgetreten, bitte versuchen sie es Später erneut.", MsgBoxStyle.Exclamation, "Fehler") Button1.Enabled = True Status.Text = "Status: Es konnte keine Verbindung zum Server aufgebaut werden" ProgressBar1.Hide() End Try Catch End Try ElseIf Button1.Text = "Fertigstellen" Then Me.Close() ElseIf Button1.Text = "Update herunterladen" Then Form1.SaveFileDialog1.Filter = "Speed Browser Setup (*.exe)|*.exe" Form1.SaveFileDialog1.FileName = "Installer" If Form1.SaveFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then ProgressBar1.Style = ProgressBarStyle.Blocks ProgressBar1.Show() Label4.Hide() Status.Text = "Status: Lade Update herunter..." Form1.Timer1.Start() Panel1.Visible = True Fortschritt.Show() Fortschritt.Text = "Restzeit wird berechnet..." Button1.Text = "Abbrechen" client.DownloadFileAsync(New Uri(z2), Form1.SaveFileDialog1.FileName) End If ElseIf Button1.Text = "Abbrechen" Then Try Fertig = False client.CancelAsync() Form1.client.CancelAsync() Panel1.Visible = False Form1.Updatefortschritt.Visible = False Form1.Timer1.Stop() MsgBox("Der Updatevorgang wurde abgebrochen!", MsgBoxStyle.Exclamation, "Update Abbruch") Me.Close() Catch End Try End If End Sub Sub DownloadStateChanged(ByVal sender As System.Object, ByVal e As System.Net.DownloadProgressChangedEventArgs) Handles client.DownloadProgressChanged ProgressBar1.Value = e.ProgressPercentage Dim megabyte As Double = CDbl((e.BytesReceived / 1024) / 1024) Dim megabytemax As Double = CDbl((e.TotalBytesToReceive / 1024) / 1024) Fortschritt.Text = e.ProgressPercentage & "% heruntergeladen ( " & Math.Round(megabyte, 1) & " MB / " & Math.Round(megabytemax, 1) & " MB)" Form1.Updatefortschritt.Text = e.ProgressPercentage & "% heruntergeladen ( " & Math.Round(megabyte, 1) & " MB / " & Math.Round(megabytemax, 1) & " MB)" If e.ProgressPercentage >= 99 Then Fertig = True End If End Sub Private Sub DownloadFileCompleted(ByVal sender As Object, ByVal e As System.ComponentModel.AsyncCompletedEventArgs) Handles client.DownloadFileCompleted Button1.Enabled = False Form1.Updatefortschritt.Visible = False My.Computer.Audio.Play(My.Resources.chimes, AudioPlayMode.Background) If Fertig = True Then If MessageBox.Show("Möchten sie das heruntergeladene Update starten?" & vbNewLine & "Das Schließen des Browsers ist erforderlich.", "Frage", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = MsgBoxResult.Yes Then Process.Start(Form1.SaveFileDialog1.FileName) Application.Exit() Else MsgBox("Sie können das Update später manuell ausführen, sie können den Browser nun weiter benutzen.", MsgBoxStyle.Information, "Information") Me.Close() End If End If End Sub Private Sub SoftwareUpdate_SizeChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.SizeChanged Try If Me.WindowState = FormWindowState.Minimized Then Me.Hide() Form1.Updatefortschritt.Visible = True End If Catch End Try End Sub Private Sub Panel2_Paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Panel2.Paint End Sub End Class |
Hallo Com
ich habe da mal eine frage
hat einer von euch das Update Prog schon hin bekommen
ich habe bei mir alles geändert aber
er sagt immer die Schöne fehlermeldung
Es konnte keiner verbindung her gestellt werden
wenn einer die Update funktion hin bekommen hat
könnte er sie denn mal pls Posten
|
|
Visual Basic Quellcode |
1 2 |
Private WithEvents httpclient As WebClient Dim pfad As String = Nothing |
|
|
Visual Basic Quellcode |
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 |
If My.Computer.Network.Ping("IP Adresse des Servers") = True Then Status.Text = "Status: Die Verbindung zum Server wurde hergestellt" Dim ftp As New Net.WebClient ftp.Credentials = New Net.NetworkCredential("ftp benutzername", "ftp passwort") Label3.Text += New Net.WebClient().DownloadString("link zur datei mit versions nummer") & vbNewLine Dim Updateme As New Net.WebClient Dim ResultBytes() As Byte = Updateme.DownloadData("link zur datei der versionsnummer") Dim Version As String = System.Text.Encoding.Default.GetString(ResultBytes) If Version = "1.0" = False Then Status.Text = "Status: Neues Update gefunden" ShowDialog: SaveFileDialog1.Filter = "setup file (*.exe)|*.exe" SaveFileDialog1.ShowDialog() If SaveFileDialog1.FileName = Nothing Then GoTo ShowDialog End If pfad = SaveFileDialog1.FileName SaveFileDialog1.Filter = "setup file (*.exe)|*.exe" Try httpclient = New WebClient Dim url As String = "datei die gedownloadet werden soll" Application.DoEvents() httpclient.DownloadFileAsync(New Uri(url), pfad) Application.DoEvents() Catch ex As Exception Status.Text = "Status: Es ist folgener Fehler aufgetreten: "(vbNewLine & ex.ToString) End End Try Else Status.Text = "Status: Keine neuen Updates gefunden!" End If Else Status.Text = "Status: Es konnte keine Verbindung zum Server aufgebaut werden!" End If |
|
|
Visual Basic Quellcode |
1 2 3 4 |
Me.ProgressBar1.Value = e.ProgressPercentage Dim totalbytes As Double = e.TotalBytesToReceive / 1024 / 1024 Dim bytes As Double = e.BytesReceived / 1024 / 1024 Me.Fortschritt.Text = bytes & "MB von" & totalbytes & "MB" |
|
|
Visual Basic Quellcode |
1 2 |
Status.Text = "Status: Die aktuelle Version wurde im angegebenen Verzeichnis gespeichert." Shell(pfad) |
Dieser Beitrag wurde bereits 4 mal editiert, zuletzt von »Marcus Gräfe« (6. Februar 2011, 15:15)
kann es sein, dass man mit dem browser nix downloaden kann?
Weil bei mir kann ich nichts downloaden damit
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »pc-freack« (28. August 2010, 11:08)
Benutzerinformationen überspringen
Dabei seit: 23. April 2010
Frühere Benutzernamen: ExtremRoyalGuard
hi hab den fehler icount nicht deklariert was ist icount ???
danke

Benutzerinformationen überspringen
Dabei seit: 30. September 2010
Frühere Benutzernamen: Christopher2000