Valhalla Legends Archive

Programming => General Programming => Visual Basic Programming => Topic started by: bD_EwiN on November 25, 2003, 07:58 PM

Title: RoomList Error!?
Post by: bD_EwiN on November 25, 2003, 07:58 PM
I decided to try out CupHead's CleanSlateBot.ocx module, and when I compiled it when I was finished, I recieved an Error with the ListView that displays users.  For instance:

In the code
RoomList.ListItems.Clear

The OCX file doesn't recognize Clear as an option...  Same goes for any extention off ListItems.  I think that my OCX file might be corrupt in some way.. any suggestions?
Title: Re:RoomList Error!?
Post by: Hazard on November 25, 2003, 08:00 PM
Can you be more specific with your problem? I'm not understanding the question clearly.
Title: Re:RoomList Error!?
Post by: MyndFyre on November 25, 2003, 08:05 PM
It seems that he is having an issue with a ListView, in that when he tries to run the Clear() method of the ListItems property, he is getting a compile-time error.

Let me first say that this has absolutely nothing to do with CSB - it's your code.

Sorry I can't help you further - I don't code VB 6.
Title: Re:RoomList Error!?
Post by: MyndFyre on November 25, 2003, 08:09 PM
Of course, I suppose that also means it should be on the VB forum.  :-P
Title: Re:RoomList Error!?
Post by: Crypticflare on November 25, 2003, 08:10 PM
If you could post the error your recieving it would be a bit more helpful, I'm not quite sure whats going on unless, you accidently added a listBox instead of a listview.
Title: This will be moved to the VB forum shortly,
Post by: Kp on November 25, 2003, 08:44 PM
... unless someone shows a clear tie to a bot development question.
Title: Re:RoomList Error!?
Post by: bD_EwiN on November 26, 2003, 06:34 AM
Yeah, I'll post the error later today.
Title: Re:RoomList Error!?
Post by: ObsidianWolf on November 26, 2003, 10:13 AM
Things to check.

Do you have a ListView Control?  Some people think a ListView control is the same as Listbox.

If you have a listview control then i suggest adding something to your statement.
This is what you have

RoomList.ListItems.Clear


This is what I would suggest trying, if the ListView control is on a form named frmMain

frmMain.RoomList.ListItems.Clear


Something also you should check for, make sure you dont have a control array on accident.  This can happen if you copy and paste your control and choose yes to the question "Would you like to create a control array".  Easy way to check this is to check the Index Property of your control.  if its blank then your good.  You can also check the name of listitems.  If it looks like

ListItems(0)

Then you need to fix the Index Property.

I hope this helps.

Good Luck.

Title: Re:RoomList Error!?
Post by: bD_EwiN on November 26, 2003, 10:41 AM
Ok, what happens when I type:
RoomList.ListItems.
And I wait for the pulldown box to pop up saying the different choices I have, the only choice is
MsComctlLib

that might give a better idea to you guys who are trying to figure out wtf I'm talking about.  ;)
Title: Re:RoomList Error!?
Post by: bD_EwiN on November 26, 2003, 10:55 AM
Whoops, problems solved.  It turns out to be that I was right in my 1st post.  My mscomtl.ocx file was corrupt  ;)

Thanks for your time everyone  ::)
Title: Re:RoomList Error!?
Post by: Arthas on November 27, 2003, 10:59 PM
lol, listviews... so... unversatile. I wrote my own control :)