Computer Science Canada

[VB6] Renaming a ListBox Item?

Author:  Shaun Dreclin [ Wed Aug 22, 2007 6:36 am ]
Post subject:  [VB6] Renaming a ListBox Item?

Pretty straightforward. Is there a way to rename an item in a list box?

Author:  Aziz [ Wed Aug 22, 2007 8:21 am ]
Post subject:  RE:[VB6] Renaming a ListBox Item?

First off, why are you using VB6 and not VB .NET? VisualBasic .NET 2005 Express Edition is a free download from Microsoft.

Second, I'm not sure of VB6, but in .NET you would have to edit the Items property of the ListBox. Something like lstBox.Items(i).Text = "Foo"

Author:  cool dude [ Wed Aug 22, 2007 9:57 am ]
Post subject:  Re: [VB6] Renaming a ListBox Item?

Aziz i'm pretty sure most schools still use Visual Basic 6.0 instead of .NET. To add an item to a list in visual basic 6.0 is straightforward.

code:
lstbox.AddItem "cool dude"

Author:  Aziz [ Wed Aug 22, 2007 10:00 am ]
Post subject:  RE:[VB6] Renaming a ListBox Item?

Sad Well they shouldn't. At least my college used .NET. Bad enough they were teaching VB anyways. At least I get Java classes this year.

Anyways, thanks for the info cool dude!

Author:  Shaun Dreclin [ Wed Aug 22, 2007 12:07 pm ]
Post subject:  Re: [VB6] Renaming a ListBox Item?

cool dude @ Wed Aug 22, 2007 9:57 am wrote:
Aziz i'm pretty sure most schools still use Visual Basic 6.0 instead of .NET. To add an item to a list in visual basic 6.0 is straightforward.

code:
lstbox.AddItem "cool dude"


I know how to add an item, I want to know how to rename one that's already there Razz

And I'm using VB6 instead of .NET because my friend doesnt know .NET, and hes the one who offered to teach me.
(I would have asked him, but hes gone on a camping trip lol)

Author:  Aziz [ Wed Aug 22, 2007 12:25 pm ]
Post subject:  RE:[VB6] Renaming a ListBox Item?

Nows a good of a time as any Smile to learn.

Oh lord. I sound like wtd.

Either way, there's lots of books and online articles. You can download Express Edition directly from the MS website. Then YOU can start teaching your friend!


google "change listbox item vb6"

Author:  Mr. T [ Wed Aug 22, 2007 6:51 pm ]
Post subject:  Re: RE:[VB6] Renaming a ListBox Item?

Aziz @ Wed Aug 22, 2007 1:25 pm wrote:
Nows a good of a time as any Smile to learn.

Oh lord. I sound like wtd.


wtd would never advocate learning VB. Rolling Eyes

Author:  Nick [ Wed Aug 22, 2007 8:13 pm ]
Post subject:  RE:[VB6] Renaming a ListBox Item?

lmao we meatn that wtd would say that nows a good time to learn as any time not in the same context (being VB) but in general wtd would say this

Author:  Aziz [ Thu Aug 23, 2007 8:06 am ]
Post subject:  RE:[VB6] Renaming a ListBox Item?

I could've went farther and said to just learn C# if you're going to be in the MS world. Or, in the true spirit of wtd, learn some obscure crazy functional objective literal language called JHairball.

BTW, Shaun, see if the MSDN (Microsoft Developer Network).


: