|
-
Apr 7th, 2001, 12:54 PM
#1
Thread Starter
Lively Member
I've made made simple internet Apps for home use.
For some reason a html won't download fully off this one site. It only downloads a short part of the HTML.
Any ideas why this is happening?
Here's the Code:
Dim b() As Byte
Dim strURL As String
Dim FileN
strURL = "[HTML PAGE]"
b() = Inet.OpenURL(strURL) 'icByteArray
FileN = "C:\Windows\Temp\Test.html"
Open FileN For Binary Access Write As #1
Put #1, , b()
Close #1
Shell "C:\Program Files\Internet
Explorer\IExplore.exe " & FileN, vbMaximizedFocus
Any idea why???
-Justin Gomes
-
Apr 7th, 2001, 01:31 PM
#2
Frenzied Member
Are you sure it's a problem with your code? It could be a problem with the web-site. Have you compared the source of the web-site with what you are getting?
-
Apr 7th, 2001, 01:36 PM
#3
Thread Starter
Lively Member
Yeah I checked
Yeah I checked the file
It was not the complete HTML.
I always check the Site after it dls the file.
No Luck
It seems to stop in the middle of the HTML.
Is there anyway around this?
-
Apr 7th, 2001, 01:37 PM
#4
Well the :
Shell "C:\Program Files\Internet
Explorer\IExplore.exe " & FileN, vbMaximizedFocus
needs to be on one line, though I guess that's just the way you put it into this post & it's different on your actual code ?
You could try using the SHELLEXCECUTE API call : http://www.vbapi.com/ref/s/shellexecute.html
Code:
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
(ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, _
ByVal lpParameters As String, ByVal lpDirectory As String, _
ByVal nShowCmd As Long) As Long
shellexecute me.hwnd, "open", FileN
Last edited by alex_read; Apr 7th, 2001 at 01:42 PM.
-
Apr 7th, 2001, 01:39 PM
#5
Thread Starter
Lively Member
Yeah that's one line
Yeah that's one line...
I put that code in there to check if it dled the whole HTML...
=(
-
Apr 7th, 2001, 01:58 PM
#6
Frenzied Member
i use this to save html files try it
Code:
On Error Resume Next
WebBrowser1.ExecWB OLECMDID_SAVEAS, OLECMDEXECOPT_PROMPTUSER
- JayWare
Live to love. Not to Hate
Im to busy to have a site. But I got one and still working on it.
http://dre3k.net/
-
Apr 7th, 2001, 02:02 PM
#7
Thread Starter
Lively Member
Using a HTML Browser...
I want to stay away from using that object.
For Performance....
I know...I'm picky...
Added This Info When edited:
Another reason I'd want to stay away from that object is it loads all the images and other things inside the HTML.
=(
-
Apr 7th, 2001, 02:08 PM
#8
Frenzied Member
How about URLDownloadToFile API:
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
The function can be called as follows:
returnValue = URLDownloadToFile(0, "http://www.microsoft.com/ms.htm", _
"c:\ms.htm", 0, 0)
Note that when downloading HTML files, embedded content like images and objects will not be downloaded.
Try this link below - This one talks about saving images.
http://msdn.microsoft.com/workshop/e...52001.asp#save
Hope that helps
-
Apr 7th, 2001, 02:16 PM
#9
Thread Starter
Lively Member
Thx so Much...
WOOOHOOO
it works
I thank you all for your time!!!
-
Apr 7th, 2001, 02:23 PM
#10
Thread Starter
Lively Member
Uh oh...another problem...but I'll work on this one later
If I run the API again it automatically uses the Page that is in Cache.
How do I make it dl it again?
This is no biggy...it has a flip side...that it is kind of good...
-
Apr 7th, 2001, 06:04 PM
#11
Frenzied Member
what are you using ? I dont get it
- JayWare
Live to love. Not to Hate
Im to busy to have a site. But I got one and still working on it.
http://dre3k.net/
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|