Results 1 to 3 of 3

Thread: Problem in Image list and Listview

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2007
    Posts
    12

    Problem in Image list and Listview

    hi guys,

    I have a comparison between two pictures and the results between those two will be display in the listview, the problem is how can i add an image to the imagelist and at the same time at the listview? or is there another best way to do it?

    Really need help...

  2. #2
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: Problem in Image list and Listview

    Quote Originally Posted by shiroi_yuki11
    ... how can i add an image to the imagelist and at the same time at the listview?...
    Perhaps like this:
    Code:
    Private Sub Command1_Click()
    Dim sImage As String
    
        sImage = "c:\new.ico"
        ImageList1.ListImages.Add , "new", LoadPicture(sImage)
        
        ListView1.SmallIcons = ImageList1
        ListView1.ListItems.Add , , "NewItem", , "new"
    
    End Sub

  3. #3

    Thread Starter
    New Member
    Join Date
    Feb 2007
    Posts
    12

    Re: Problem in Image list and Listview

    Thanks but the code doesn't apply to me... I want to add the pictures in the imagelist everytime (because of looping) and at the same time in the listview? I forgot to mention that my listview has a col header (But I could take it off).

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