Loading onr to a frame

Discussion in 'Code Snippets and Tutorials' started by Billy, May 13, 2007.

  1. Billy

    Billy Level IV

    Joined:
    Feb 21, 2007
    Messages:
    1,856
    Likes Received:
    39
    is there any way to do this without saving the picture first?
     
  2. the_skip

    the_skip Level IV

    Joined:
    Dec 25, 2006
    Messages:
    2,354
    Likes Received:
    1
    Location:
    Indiana
    I belive so try this add this to your http wrapper
    Code (Text):
    1. Public Function GetImage(Image As String, Optional ProxyServer As String = "", Optional ProxyPort As Long = 80) As String
    2.     If ProxyServer = "" Then
    3.         GetImage = GetWrapper(Image)
    4.     Else
    5.         GetImage = GetWrapper(Image, , ProxyServer, ProxyPort)
    6.     End If
    7.  
    8.     GetImage = Mid(GetImage, _
    9.                InStr(1, GetImage, _
    10.                vbCrLf & vbCrLf) + 4)
    11.  
    12. End Function
    13.  
     
  3. Billy

    Billy Level IV

    Joined:
    Feb 21, 2007
    Messages:
    1,856
    Likes Received:
    39
    thats already in my wrapper and when i do this it gives me an error
    Code (Text):
    1. picPreview.picture = w.getimage("www.neopets.com/" & strpic)
     
  4. the_skip

    the_skip Level IV

    Joined:
    Dec 25, 2006
    Messages:
    2,354
    Likes Received:
    1
    Location:
    Indiana
    whats the problem
     
  5. Billy

    Billy Level IV

    Joined:
    Feb 21, 2007
    Messages:
    1,856
    Likes Received:
    39
    runtime error 424:
    object required
     
  6. tac123

    tac123 Level I

    Joined:
    Apr 29, 2007
    Messages:
    124
    Likes Received:
    0
    Hmm... I do it, but I don't use the wrapper you guys use or even VB6.

    If your wrapper will return the byte stream when you request an image, I would copy this into an Image object that can be placed in the picture holder. What is the call you normally use to send the image to a file?
     
  7. Billy

    Billy Level IV

    Joined:
    Feb 21, 2007
    Messages:
    1,856
    Likes Received:
    39
    i tried storing it to a variable first if thats what you mean, but it still didnt work :x
     
  8. the_skip

    the_skip Level IV

    Joined:
    Dec 25, 2006
    Messages:
    2,354
    Likes Received:
    1
    Location:
    Indiana
    no he means writing to a file.
     
  9. Billy

    Billy Level IV

    Joined:
    Feb 21, 2007
    Messages:
    1,856
    Likes Received:
    39
    ohh... if thatll work then ok, if thats the only way. i tried before but i got so many errors, i tried to find a different way.. maybe i was doing it wrong, whats the right way of doing it?
     
  10. tac123

    tac123 Level I

    Joined:
    Apr 29, 2007
    Messages:
    124
    Likes Received:
    0
    No, I actually meant keeping in an object in VB6 and never writing it to a file. You would have to make sure you use variables of the proper type though and that your picture box takes an object of that type for display.

    I can't really say much more without knowing the interface that the wrapper uses.
     
  11. Billy

    Billy Level IV

    Joined:
    Feb 21, 2007
    Messages:
    1,856
    Likes Received:
    39
    i tried that, but it doesnt work :( but thanks anyways :) . at this point, i dont care what i do as long as i can get it into the frame, lol
     
  12. omgcat

    omgcat Level IV

    Joined:
    Jan 31, 2007
    Messages:
    1,137
    Likes Received:
    0
    Im wanting to know this also, because I want to use it for my ab'er in the process.
     
  13. the_skip

    the_skip Level IV

    Joined:
    Dec 25, 2006
    Messages:
    2,354
    Likes Received:
    1
    Location:
    Indiana
    try using thie
    picture1.picture = loadpicture(url or httpwrapper.getpicture())
     
  14. Billy

    Billy Level IV

    Joined:
    Feb 21, 2007
    Messages:
    1,856
    Likes Received:
    39
    it gives me the error "File not found: 'yoya'"