Why LoadPicture() works on local pathes and doesn't work on the URLS 
Author Message
 Why LoadPicture() works on local pathes and doesn't work on the URLS

For expample LoadPicture( http://www.*-*-*.com/ ) raises
exception: File Not Found: "LoadPicturing"


Tue, 12 Oct 2004 22:26:49 GMT  
 Why LoadPicture() works on local pathes and doesn't work on the URLS
Because you are loading a file and it expects to find one in a path.  It works
analogously to ReadFile; you can use a local relative path, but if you toss in
an "http", it fails also..


Quote:
> For expample LoadPicture(http://www.asicdesign.ru/folder.jpg) raises
> exception: File Not Found: "LoadPicturing"



Wed, 13 Oct 2004 01:46:22 GMT  
 Why LoadPicture() works on local pathes and doesn't work on the URLS



Quote:
> Because you are loading a file and it expects to find one in a path.  It
works
> analogously to ReadFile; you can use a local relative path, but if you
toss in
> an "http", it fails also..

And what I need to do?

<Object id=imgList1 height=1 width=1
classid=clsid:2C247F23-8591-11D1-B16A-00C0F0283628>
</Object>

<IMG src="http://www.asicdesign.ru/folder.jpg" ID=FIM>
<Script language=VBScript>
            imgList1.ListImages.Add, "folder", FIM
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^6
                    It doesn't work too ! I'll be dead very soon :(((
                    Error: Inavlid Picture

</Srcipt>



Wed, 13 Oct 2004 03:33:54 GMT  
 Why LoadPicture() works on local pathes and doesn't work on the URLS
If this is the same site, have you tried a relative path?

I'm not familiar with the control you are using there, which may play into the
problem - what is the ProgID or a common name for it?


Quote:



> > Because you are loading a file and it expects to find one in a path.  It
> works
> > analogously to ReadFile; you can use a local relative path, but if you
> toss in
> > an "http", it fails also..

> And what I need to do?

> <Object id=imgList1 height=1 width=1
> classid=clsid:2C247F23-8591-11D1-B16A-00C0F0283628>
> </Object>

> <IMG src="http://www.asicdesign.ru/folder.jpg" ID=FIM>
> <Script language=VBScript>
>             imgList1.ListImages.Add, "folder", FIM
>             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^6
>                     It doesn't work too ! I'll be dead very soon :(((
>                     Error: Inavlid Picture

> </Srcipt>



Wed, 13 Oct 2004 04:08:23 GMT  
 Why LoadPicture() works on local pathes and doesn't work on the URLS

Quote:
> For expample LoadPicture(http://www.asicdesign.ru/folder.jpg) raises
> exception: File Not Found: "LoadPicturing"

LoadPicture supports *only* file system paths.  It has never supported HTTP urls.

--
Michael Harris
Microsoft.MVP.Scripting
Seattle WA US
--



Wed, 13 Oct 2004 08:12:04 GMT  
 Why LoadPicture() works on local pathes and doesn't work on the URLS

Quote:
> If this is the same site, have you tried a relative path?

Yes, but it desn't work.

Quote:

> I'm not familiar with the control you are using there, which may play into
the
> problem - what is the ProgID or a common name for it?

This is the  ImageList. I'm using it for TreeView

Quote:




wrote

> > > Because you are loading a file and it expects to find one in a path.
It
> > works
> > > analogously to ReadFile; you can use a local relative path, but if you
> > toss in
> > > an "http", it fails also..

> > And what I need to do?

> > <Object id=imgList1 height=1 width=1
> > classid=clsid:2C247F23-8591-11D1-B16A-00C0F0283628>
> > </Object>

> > <IMG src="http://www.asicdesign.ru/folder.jpg" ID=FIM>
> > <Script language=VBScript>
> >             imgList1.ListImages.Add, "folder", FIM
> >             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^6
> >                     It doesn't work too ! I'll be dead very soon :(((
> >                     Error: Inavlid Picture

> > </Srcipt>



Wed, 13 Oct 2004 14:07:06 GMT  
 Why LoadPicture() works on local pathes and doesn't work on the URLS

Quote:
> For expample LoadPicture(http://www.asicdesign.ru/folder.jpg) raises
> exception: File Not Found: "LoadPicturing"

LoadPicture supports *only* file system paths.  It has never supported HTTP
urls.

I need to download images to ImageList. What I can use for it???

--
Michael Harris
Microsoft.MVP.Scripting
Seattle WA US
--



Wed, 13 Oct 2004 14:08:06 GMT  
 Why LoadPicture() works on local pathes and doesn't work on the URLS
I'm going to be useless for a reasonable answer on this part since I haven't
used that before. I'm hoping Michael has a good suggestion (he usually does).


Quote:

> > If this is the same site, have you tried a relative path?
> Yes, but it desn't work.

> > I'm not familiar with the control you are using there, which may play into
> the
> > problem - what is the ProgID or a common name for it?
> This is the  ImageList. I'm using it for TreeView




> wrote

> > > > Because you are loading a file and it expects to find one in a path.
> It
> > > works
> > > > analogously to ReadFile; you can use a local relative path, but if you
> > > toss in
> > > > an "http", it fails also..

> > > And what I need to do?

> > > <Object id=imgList1 height=1 width=1
> > > classid=clsid:2C247F23-8591-11D1-B16A-00C0F0283628>
> > > </Object>

> > > <IMG src="http://www.asicdesign.ru/folder.jpg" ID=FIM>
> > > <Script language=VBScript>
> > >             imgList1.ListImages.Add, "folder", FIM
> > >             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^6
> > >                     It doesn't work too ! I'll be dead very soon :(((
> > >                     Error: Inavlid Picture

> > > </Srcipt>



Wed, 13 Oct 2004 20:48:10 GMT  
 Why LoadPicture() works on local pathes and doesn't work on the URLS

Quote:

> I need to download images to ImageList. What I can use for it???

My guess is that you'll need to write a VB UserControl that encapsulates and exposes an ImageList control with images loaded at design time rather than at runtime.  

Of course you'll then need to deal with packaging, signing. and installing it on the client:

Internet Component Download Tutorials
http://msdn.microsoft.com/library/default.asp?url=/workshop/delivery/...

How to Package Components for Internet Distribution
http://msdn.microsoft.com/workshop/delivery/download/tutorials/button...

You'll also need to implement IObjectSafety on your UserControl:

Q182598 - HOWTO: Implement IObjectSafety in Visual Basic Controls
http://support.microsoft.com/support/kb/articles/Q182/5/98.ASP

This is a pretty good illustration of why I personally would never consider using TreeView, ListView, and ImageList controls in IE...

--
Michael Harris
Microsoft.MVP.Scripting
Seattle WA US
--



Thu, 14 Oct 2004 03:58:53 GMT  
 
 [ 9 post ] 

 Relevant Pages 

1. works / doesn't work, why?

2. Why oh why doesn't this work?

3. LoadPicture function doesn't always works???

4. Why doesn't this work

5. Why doesn't it work?

6. Why doesn't this work?

7. newbie: aarrggh - why doesn't this work?

8. RegExp question, why doesn't this work?

9. Why doesn't this work!

10. Puzzled: Why doesn't this work?

11. Help needed !! Why doesn't this work

12. why this code doesn't work?

 

 
Powered by phpBB® Forum Software