How to Bind ListBox for Windows Form(VB.NET)

  • Thread starter Thread starter SAM
  • Start date Start date
S

SAM

Hi,

1)I have List Box which displays all user list, When I
double click on User , I am displaying User Information on
the right hand side Text Boxes , But In Order to Retrive
the values I can't query with User Name because there are
duplicate names , So I Want to find details about the user
with his/her ID#. How would I do that when I bind the
ListBox at the FormLoad event.

2)How could I Call another form from other form by using
formname.show ( used to be in VB 6).

thanks,
Saurabh
 
You can use the DisplayMember and ValueMember properties. the Bound list
box would DisplayMember would be the name, the valuemember would be the id.
Of you could concatentate them without databinding at all and then extract
the number.

In vb.NEt, declare a new form instance and then use show.

Dim frmSomething as New frmSomething
frm.Show

HTH

Bill
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top