Skriver lige min kode til mit program, ved ikke om det kan hjælpe..
jeg har markeret hvor min kode skal stå.. tror jeg...
<---[liveu.frm]--->
Private Sub Command1_Click()
Dim TransferSuccess As Boolean
UpdateTime = 0
Timer2.Interval = 1000
Command1.Enabled = False
ProgressBar1.Value = 1
status$ = "Checking for updated version."
TransferSuccess = GetInternetFile(Inet1, "
http://domæne.dk/update/newversion.dat", "c:/")
If TransferSuccess = False Then
ProgressBar1.Value = 3
Timer2.Interval = 0
Exit Sub
End If
ProgressBar1.Value = 2
status$ = "Version check success."
Open "c:\newversion.dat" For Input As #1
Input #1, updatever$
Close #1
If updatever$ > myVer Then
Label1.Caption = "There is an update available to version " + updatever
Else
Label1.Caption = "There is no update available."
ProgressBar1.Value = 3
Command1.Enabled = True
Timer2.Interval = 0
Exit Sub
End If
status$ = "Getting updated file."
TransferSuccess = GetInternetFile(Inet1, "
http://domæne.dk/update/update.exe", "c:\temp")
If TransferSuccess = False Then
ProgressBar1.Value = 3
Command1.Enabled = True
Timer2.Interval = 0
Exit Sub
End If
ProgressBar1.Value = 3
Timer2.Interval = 0
X = MsgBox("Live Update Complete!", vbInformation)
Command1.Enabled = True
' HER SKAL KODEN INDSÆTTES
End Sub
Private Sub Form_Load()
On Local Error GoTo 200
' myVer = App.Major & "." & App.Minor & "." & App.Revision
' this is where the updated program needs to write it's current version
' number to. The above commented out line puts the version number in
' the correct format.
status$ = "Idle"
UpdateTime = 0
Open "ver.dat" For Input As #1
Input #1, myVer
Close #1
Exit Sub
200 myVer = "1.0.0"
Resume 205
205 End Sub
Private Sub mnufile_Click()
End Sub
Private Sub Timer1_Timer()
If Inet1.StillExecuting = False Then
StatusBar1.Panels(1).Text = "Status: Idle"
Else
StatusBar1.Panels(1).Text = "Status: " & status$
End If
End Sub
Private Sub Timer2_Timer()
UpdateTime = UpdateTime + 1
StatusBar1.Panels(2).Text = "Download Time:" & Str$(UpdateTime) & " Seconds"
End Sub