2 Replies - 9563 Views - Last Post: 14 February 2008 - 09:18 PM Rate Topic: -----

#1 oXiDe  Icon User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 41
  • Joined: 17-November 07

image list help

Posted 09 February 2008 - 12:49 PM

Ok i have a form w/ 3 objects: a cmd button, a list view, and an imagelist
the image list has an image in it

heres code
Private Sub cmd_Click()

lv.ListItems.Add.Icon = 1

End Sub


When i run it & hit the cmd, it says

Quote

Run-time error '35613':

ImageList must be initialized before it can be used


please tell me what i must do to initialize the imagelist

Is This A Good Question/Topic? 0
  • +

Replies To: image list help

#2 PsychoCoder  Icon User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1639
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: image list help

Posted 09 February 2008 - 01:12 PM

In VB6 the ImageList must be initialized, tied to a component, like

Set Listview1.SmallIcons = ImageList1


Was This Post Helpful? 0
  • +
  • -

#3 oXiDe  Icon User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 41
  • Joined: 17-November 07

Re: image list help

Posted 14 February 2008 - 09:18 PM

thanks 4 ur help :D srry took me long time to respond
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1