i am using this api(thanks to iprank) to download an html file directly to file without the webbrowser control ,the advantage being that u can skip loading the images if any in an html file...
VB Code:
Private Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long Public Function DownloadFile(URL As String, LocalFilename As String) As Boolean Dim lngRetVal As Long lngRetVal = URLDownloadToFile(0, URL, LocalFilename, 0, 0) If lngRetVal = 0 Then DownloadFile = True End Function Private Sub Form_Load() DownloadFile "http://www.somesite.com", "c:\sample.txt" End Sub
hope it helps!!




Reply With Quote