VB6 .exe bestand openen in Windows 7 error

Status
Niet open voor verdere reacties.

bastiaansmit94

Gebruiker
Lid geworden
13 okt 2008
Berichten
125
Hallo allemaal,

Ik zit met een probleem. Ik heb een mooi programmaatje gemaakt in Visual Basic 6 alleen als is hem dan omzet naar een .exe bestand en hem vervolgens open dan krijg ik een Error. Ik heb even op google gezocht en heb het probleem gevonden. Alleen weet ik niet hoe ik mijn script moet veranderen! De uitleg wat ik moet doen staat hier: http://support.microsoft.com/kb/828550 Mijn programma bestaat uit meerdere forms nu heb ik het form met het probleem weg gehaald en nu doet hij het wel gewoon alleen wil ik dat die form er wel weer in geplaats wordt want het is een belangrijke!

Ik hoop dat iemand mijn code kan aanpassen naar dat gene wat wel goed is!

Mvg Bastiaan


Dit is mijn code van mijn form:

Code:
Option Explicit

Private WithEvents mobjDownload As Download

Private Sub Form_Load()
    prgDownload.Max = 100
    Set mobjDownload = New Download
    ConfigureForm False
          
WebBrowser1.Navigate "http://bastiaansmit.nl"
Do
    DoEvents
Loop Until WebBrowser1.Busy = False

    Dim sHTML As String
    sHTML = WebBrowser1.Document.documentElement.innerHTML

    If InStr(1, sHTML, "The page cannot be found") > 0 Then
        frmMain.Visible = False
        Form1.Visible = True
    Else
        Dim strSource   As String
        Dim strDest     As String
            strSource = Trim$(txtSource.Text)
            strDest = Trim$(txtDest.Text)
        If Len(strSource) > 0 And Len(strDest) > 0 Then
             mobjDownload.StartDownload strSource, strDest
        Else
            MsgBox "ERROR by downloaden!", vbExclamation, "Update"
        End If
    End If
    
End Sub

Private Sub Form_Unload(Cancel As Integer)
    Set mobjDownload = Nothing
End Sub

Private Sub mobjDownload_DownloadAborted(ByVal ErrNumber As Long, ErrDescription As String)
Dim strMsg  As String
    ConfigureForm False
    strMsg = "Update aborted."
    If Len(ErrDescription) > 0 Then
        strMsg = strMsg & " " & ErrDescription & "        Please tell this to |JsF| Bastiaan!"
        frmMain.Visible = False
        Form1.Visible = True
    End If
    MsgBox strMsg, vbCritical, "Update"
End Sub

Private Sub mobjDownload_DownloadComplete()
    ConfigureForm False
    MsgBox "Download complete", vbInformation, "Update"
    Form2.Visible = True
    frmMain.Visible = False
End Sub

Private Sub mobjDownload_DownloadProgress(ByVal ReceivedBytes As Long, ByVal TotalBytes As Long)
    lblReceived.Caption = Format$(ReceivedBytes / 1024, "0.00") & "Kb"
    lblTotal.Caption = Format$(TotalBytes / 1024, "0.00") & "Kb"
    prgDownload.Value = CLng(100 * (ReceivedBytes / TotalBytes))
    DoEvents
End Sub

Private Sub mobjDownload_DownloadStarted()
    ConfigureForm True
End Sub

Private Sub ConfigureForm(ByVal pblnDownloadStarted As Boolean)
    cmdStart.Enabled = Not pblnDownloadStarted
    cmdCancel.Enabled = pblnDownloadStarted
    If pblnDownloadStarted Then
        prgDownload.Value = 0
    End If
End Sub

Private Sub Picture7_Click()
frmMain.Visible = False
End Sub
 
Status
Niet open voor verdere reacties.
Terug
Bovenaan Onderaan