Ir para conteúdo
Fórum Script Brasil
  • 0

Help-me Solução para erro no VB 2010


Enygmapb

Pergunta

Boa noite,

Olá amigos , sou novo no forum e novo com o visual basics 2010.

Gostaria de saber estou fazendo um projeto de launcher com + auto update e o mesmo esta dando o seguinte erro

Consulte o final desta mensagem para obter detalhes sobre como chamar a
depuração just-in-time (JIT) em vez desta caixa de diálogo.
************** Texto de Exceção **************
System.NullReferenceException: Referência de objeto não definida para uma instância de um objeto.
em WindowsApplication1.Form1.wb_DownloadFileCompleted(Object sender, AsyncCompletedEventArgs e) na C:\Users\Familia Vasconcelos\documents\visual studio 2010\Projects\WindowsApplication1\WindowsApplication1\Form1.vb:linha 26
em System.Net.WebClient.OnDownloadFileCompleted(AsyncCompletedEventArgs e)
em System.Net.WebClient.DownloadFileOperationCompleted(Object arg)
-------------------------------------------------------------------------
Aki esta minha codigo alguém pode achar o erro?
Public Class Form1
WithEvents wb As New WebClient
Dim _arquivos As String
Dim int As Integer = 0
Private Function getFileMd5(ByVal filePath As String) As String
Dim File() As Byte = System.IO.File.ReadAllBytes(filePath)
Dim Md5 As New MD5CryptoServiceProvider()
Dim byteHash() As Byte = Md5.ComputeHash(File)
Return Convert.ToBase64String(byteHash)
End Function
Private Sub FusionTheme1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FusionTheme1.Click
If Not My.Computer.FileSystem.FileExists(Application.StartupPath & "\filehash.txt") Then
status.Text = "Baixando Complementos de Atualização"
wb.DownloadFileAsync(New Uri("http://enygmapb.byethost11.com/filehash.txt"), Application.StartupPath & "\filehash.txt")
VerificarArquivos()
Else
VerificarArquivos()
End If
End Sub
Private Sub wb_DownloadFileCompleted(ByVal sender As Object, ByVal e As System.ComponentModel.AsyncCompletedEventArgs) Handles wb.DownloadFileCompleted
int += 1
If _arquivos.Contains("[arquivo1]") Then
_arquivos = _arquivos.Replace("[arquivo1]", "")
status.Text = "Baixando Arquivo1.zip"
wb.DownloadFileAsync(New Uri("http://enygmapb.byethost11.com/arquivo1.zip"), Application.StartupPath & "\arquivo1.zip")
End If
End Sub
Private Sub wb_DownloadProgressChanged(ByVal sender As Object, ByVal e As System.Net.DownloadProgressChangedEventArgs) Handles wb.DownloadProgressChanged
ProgressBar1.Maximum = e.TotalBytesToReceive
ProgressBar1.Value = e.BytesReceived
End Sub
Private Sub VerificarArquivos()
Try
Dim _filehash As String() = System.IO.File.ReadAllLines(Application.StartupPath & "\filehash.txt")
If Not My.Computer.FileSystem.FileExists(Application.StartupPath & "\arquivo1.zip") Then
_arquivos &= "[arquivo1]"
Else
If Not getFileMd5(Application.StartupPath & "\arquivo1.zip") = _filehash(1) Then
_arquivos &= "[arquivo1]"
End If
End If
Call wb_DownloadFileCompleted(Nothing, Nothing)
Catch ex As Exception
End Try
End Sub
End Class

~~~~~~~~~~~~

Obrigado desde de já !

Link para o comentário
Compartilhar em outros sites

0 respostass a esta questão

Posts Recomendados

Até agora não há respostas para essa pergunta

Participe da discussão

Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emoticons são permitidos.

×   Seu link foi incorporado automaticamente.   Exibir como um link em vez disso

×   Seu conteúdo anterior foi restaurado.   Limpar Editor

×   Você não pode colar imagens diretamente. Carregar ou inserir imagens do URL.



  • Estatísticas dos Fóruns

    • Tópicos
      152k
    • Posts
      651,8k
×
×
  • Criar Novo...