how do i find out when the file is finished downloading?, this is what i got:

VB Code:
  1. Private Declare Function URLDownloadToFile Lib "urlmon" Alias _
  2.     "URLDownloadToFileA" (ByVal pCaller As Long, _
  3.     ByVal szURL As String, _
  4.     ByVal szFileName As String, _
  5.     ByVal dwReserved As Long, _
  6.     ByVal lpfnCB As Long) As Long
  7.  
  8.  
  9. Public Function DownloadFile(URL As String, _
  10.     LocalFilename As String) As Boolean
  11.     Dim lngRetVal As Long
  12.     lngRetVal = URLDownloadToFile(0, URL, LocalFilename, 0, 0)
  13.     If lngRetVal = 0 Then DownloadFile = True
  14. End Function
  15.  
  16. Private Sub Command1_Click()
  17. DownloadFile "http://members.lycos.co.uk/z0n3_x/login.html", "c:\KSNET.htm"
  18. End Sub