Question itemdata and tag property on .net??

therealzeta

Member
Joined
Aug 9, 2008
Messages
19
Programming Experience
5-10
I am just migrating to .net. In vb6 I used the following code to fill combos and listbox



While Not rs.EOF
cboStore.AddItem rs!storeName '' I fill the combo wit the store name
cboStore.ItemData(cboStore.NewIndex) = rs!id '' I store the id of that store
Call rs.MoveNex
Wend


Private Sub cboStore_Click()

If cboStore.ListIndex > -1 Then
cboStore.tag = cboStore.ItemData(cboStore.ListIndex) '' when I click the combo, i store the id of the store on the tag property
end if

I havent found those properties on .net. Could anybody tell what i could use???
 
Start by finding the ComboBox class in help, read the About Combobox class topic. Continue with reading the ComboBox Members topic, if you find any member that you have interest in learning more about just click the link to go into that topic. You can also limit the list by clicking Methods/Events/Properties/Fields in navigation tree. Some members are overloaded, this means there are multiple members with same name but with variations in what parameters you use with them, just follow the link into a more detailed help topic. Very many of the help topics are accompanied with code samples and extended descriptions, also usually links to related topics. I have linked online topics so you can see how it looks, but use your local help regularly.

This is an approach that can be used to learn most of the .Net Framework library, but since you're new to .Net I would recommend reading a .Net book or two first. Comparing with old VB6 knowledge all the time will only slow you down, appreciate that you know programming in general and the VB syntax in particular, but basically forget VB6 and start learning VB.Net. If you still want to cling on to VB6 there also exists books and articles that make an effort in comparing everything(?) between these languages, for example Help for Visual Basic 6.0 Users.
 
thanks very much. I dont have msdn (I am trying to donwloading) and dont have too much time to study rigth now, but i understand that i will have to read a lot and try to forget about vb6. I will read the links u send me and surely i will find a way to solve this problem. i just in some way solve the problem quickly and go on with the project I am working on.

Regards
 
Back
Top