Results 1 to 3 of 3

Thread: Images disappear?!?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2000
    Location
    Denver
    Posts
    265

    Images disappear?!?

    Scenario: I'm passing a listview and an imagelist (which contains the images the listview uses) to a dll. The dll uses late binding to access the properties of both controls i.e. public sub...(byval imagelist as object...)
    Ok, so the listview part works 100%. The only problem I have is with the imagelist. I can pass it to the dll and access properties such as .name, .listimages.count, and other such properties. However, when I try and do anything with the images in the listview I can't get a thing to work. It's like they aren't there!! For instance, if I try and populate a picturebox with one of the images, nothing happes.

    The only thing I can think of is that I've noticed if you copy and paste an imagelist in a standard .exe you have to re-add the images to the list. I don't know if something similar is happening when I pass the imagelist to the dll. Does ANYBODY have any ideas about what I can do to use the images after I pass the imagelist to the dll???

    Thanks!!!

  2. #2

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2000
    Location
    Denver
    Posts
    265

    ...

    Ok, I'm assuming nobody out there can tackle this one...how about this question then?

    Is there any code I could put in the dll that would somehow extract the images from the imagelist in the exe that's calling the dll?

    Thanks again!

  3. #3
    Member
    Join Date
    Aug 1999
    Location
    Houston
    Posts
    48

    image lists

    I don't know how much of a help this is, but image lists have been one of the most frustrating thing to work with in VB6. Even working with image lists in a normal executable is tedious and very tricky. You are correct about needing to redo everything, if you want to change the order of the images, you have to clear everythinbg out and re-add then entire list one by one. If you are trying to do all of this automatically in a .dll, then I can understand why you are having difficulties.

    First I would suggest learning how to master image lists in the normal setting (manually), and then learn how to empty and re-add all of the images (and filenames) one-by-one in a project. Once you can master clearing out and adding everything from scratch during run-time, then port it to a .dll and it should work.

    Basically, learn how to re-add all the filenames to the list and make this work during run-time. Then put that code (subroutine) in your .dll.

    -lp

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width