Question : Vs2003 VB.NET I can't find ListItem

I am using a listbox control for the first time and trying to add items.
Example so it using a ListItem

I can't find the definition in VB.NET on Vs2003 ?

So how do you add items to a list control without using a data source

Answer : Vs2003 VB.NET I can't find ListItem

And don't forget...you can add whatever you want to the ListBox...it doesn't have to be just Strings.   =)

If you add an Object, it will be displayed by whatever is returned by its ToString() function method.

If you write a custom Class, then provide your own ToString() method to define how it should appear.

You can also set the DataSoure as an ArrayList, and then set the DisplayMember property so that one of the Classes properties is displayed in the ListBox instead of the ToString() value.  There is a simple example of this here:
http://msdn2.microsoft.com/en-us/library/system.windows.forms.listcontrol.displaymember(VS.71).aspx
Random Solutions  
 
programming4us programming4us