Re: Get images with MSHTML library in Visual Basic 6.0



On Wed, 13 Jul 2005 20:30:43 +0100, "Mike D Sutton" <EDais@xxxxxxxx>
wrote:

look below...

>> Hello, Look through this snippet for my question...
>> Thanks. Does anyone have any suggestions?
><code snipped>
>> What do I put here to get the binary data returned from the image tag
>> contained in the doc object?
>>
>> When using the .navigate method with the InternetExplorer object, does
>> it return actual binary content that I can access and store on the
>> hard drive? Or, does it just return the html document "text" without
>> returning any "byte arrays" which would be image data?
>>
>> MUST I use the stream object and the msxml object to do this?
>>
>> It seems I should be able to .navigate to some binary resource URL and
>> then get the binary data from the HTMLDocument object.
>>
>> Is there another class in the (\WINNT\system32\MSHTML.TLB) MSHTML
>> library I'm missing which would easily do this?
>
>I don't know of any way to do this through the object model, but the HTMLImg object has an href property which specifies
>the URI to the image, you can then use the Internet*() API calls to go and grab that file. Since both objects use the
>same internet cache, if web browser has already downloaded the file then this will simply pull back the local copy of
>the file.
>To grab the file use the InternetOpen(), InternetOpenUrl(), InternetReadFile() and InternetCloseHandle() API calls.
>Hope this helps,
>
> Mike
>
>
> - Microsoft Visual Basic MVP -
>E-Mail: EDais@xxxxxxxx
>WWW: Http://EDais.mvps.org/
>

Thanks.

As an even better time saver, I could add the internet shdocvw.dll
class to a form and then use it's methods to navigate to the binary
resource. The control on the VB form will put the binary into the
cache defined by the pre-existing control by the installation of
windows.

Can I change the form.[internetControl].[properties] while it is
running to cache the images to another directory?


.



Relevant Pages

  • RE: OWA Errors
    ... THNAK YOU Jenny - it works and everything is fixed now. ... > C Restart IE and then access the OWA site again. ... Open an Internet Explorer window. ... > force the cache object to be updated. ...
    (microsoft.public.windows.server.sbs)
  • Re: HttpWebRequest problem
    ... It estabishes the connection to the server every time. ... The problem is that the> HttpWebRequest object internally uses the browser cache. ... > If I open internet explorer, enter the same URL and hit refresh couple> of times, the new version of the text file appears. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Spyware in Content.IES
    ... You ever see what kind of crap is in the "cache"? ... Temporary Internet Files Use More Disk Space Than Specified ... >>> MS uses a percentage of the hard disk for the cache. ...
    (microsoft.public.windowsxp.security_admin)
  • Re: MS Windows 2003 SBS SP1 w/ ISA Server 2000 - Issues publishing a WSS site via ISA Server 200
    ... attempting to access the site from an external network (i.e. the Internet), ... On the SBS 2003 Server open the Server Management console. ... client computer, clear DNS, IIS and ISA cache on SBS and check if the ...
    (microsoft.public.windows.server.sbs)
  • Re: Spyware in Content.IES
    ... Internet files tend to be small, that means there are 10's of thousands of files in the ... The whole idea of the cache is to speed up access on slow internet connections by ... Dave ... |> MS uses a percentage of the hard disk for the cache. ...
    (microsoft.public.windowsxp.security_admin)