Results 1 to 5 of 5

Thread: Show icon of exe file in Listview

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2000
    Posts
    4

    Post

    Hi

    I read one tip in vb-world about extract icon from exe or dll file. I did it successfully. The problem is, I try to put that Picture object in ImageList for use with ListView but it give me an error "Out of Memory"!!!!!

    Anyone know how to get to icon from exe file an put it in listview, Please help.

    Thanks in advance

  2. #2
    Fanatic Member
    Join Date
    Jan 1999
    Location
    UK
    Posts
    593

    Post

    Try using the intermediate step of a picture box. Put the icon into the picture box, and then put the icon from the picture box into the listview.


    ------------------
    John Percival
    Editor, VB-World.net
    john@vb-world.net



  3. #3

    Thread Starter
    New Member
    Join Date
    Jan 2000
    Posts
    4

    Post

    John,

    I still got an error. This is my code

    Private Sub Form_Activate()

    Dim imgX As ListImage
    Picture1.Picture = IconFromFile.GetIconFromFile("c:\windows\cdplayer.exe", 0, False)
    Set imgX = imgProgList.ListImages.Add(, , Picture1.Picture)

    End Sub

    The Picture control show icon successfully but when it execute the next line it report an error "Out of Memory"

  4. #4
    Registered User
    Join Date
    Apr 1999
    Location
    Brazil
    Posts
    144

    Post

    I'll send you an e-mail with 2 bas files that can sold your problem.

    It's the code that I use!

    Boa sorte.
    Jefferson

  5. #5
    Guest

    Post

    Hey Jeff, would U mind e-mailing it to me too ? I'm cusrious about this glitch too..

    Knight
    kvision@gate.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
  •  



Click Here to Expand Forum to Full Width