I'm using a Inet thing to download a file. The file is called brain.txt.

here's the "ignition code":

VB Code:
  1. Screen.MousePointer = vbHourglass
  2.  
  3. ProgressBar1.Value = 0
  4.  
  5. 'ProgressBar1.Visible = True 'show progressbar
  6.  
  7. 'This downloads the file and saves to your machine
  8. Timer1.Enabled = True
  9. If filen = "adam.exe" Then
  10. DownloadFile "http://www.guitar.gratisplaneten.com/adam/" & filen, App.Path & "\adam_.exe"
  11. Screen.MousePointer = vbDefault

And here's the DownloadFile code:

VB Code:
  1. Public Sub DownloadFile(strURL As String, strDestination As String) 'As Boolean
  2. Const CHUNK_SIZE As Long = 1024
  3. Dim intFile As Integer
  4. Dim lngBytesReceived As Long
  5. Dim lngFileLength As Long
  6. Dim strHeader As String
  7. Dim b() As Byte
  8. Dim i As Integer
  9.  
  10. DoEvents
  11.    
  12. With Inet1
  13.    
  14. .url = strURL
  15. .Execute , "GET", , "Range: bytes=" & CStr(lngBytesReceived) & "-" & vbCrLf
  16.        
  17. While .StillExecuting
  18. DoEvents
  19. Wend
  20.  
  21. strHeader = .GetHeader
  22. End With
  23.    
  24.    
  25. strHeader = Inet1.GetHeader("Content-Length")
  26. lngFileLength = Val(strHeader)
  27.  
  28. DoEvents
  29.    
  30. lngBytesReceived = 0
  31.  
  32. intFile = FreeFile()
  33.  
  34. Open strDestination For Binary Access Write As #intFile
  35.  
  36. Do
  37. b = Inet1.GetChunk(CHUNK_SIZE, icByteArray)
  38. Put #intFile, , b
  39. lngBytesReceived = lngBytesReceived + UBound(b, 1) + 1
  40.  
  41. DownloadProgress (Round((lngBytesReceived / lngFileLength) * 100))
  42. DoEvents
  43. Loop While UBound(b, 1) > 0
  44.  
  45. Close #intFile
  46.  
  47. End Sub


My problem is that when I've downloaded the file, everywhere in it where there should be enters, there's instead a wierd box sign ( almost like this [] ).

How can I download the file normal, so I get it as it should be?

Plz help!

//Alex