473,396 Members | 2,002 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

newb help

Hello,

I'm storing my student objects in a list box and using the displaymember to
display to display the student first name and lastname.

lstStudents.DisplayMember = "LastFirst"

Dim tmpStudent As Student
For Each tmpStudent In mStudents
lstStudents.Items.Add(tmpStudent)
Next
lblCount.Text = mStudents.Count.ToString()

Now i need to extract the objects from the list based on user selection. I
know it has something to do with selecteditem but cant figure it out.

Help is appreciated

thanks
Nov 21 '05 #1
2 838
Hi,

Dim tmpStudent As Student

Try
tmpStudent = Ctype(lstStudents.selecteditem,student)
catch
' error getting data
end try

Ken
----------------------------------
"Troy" wrote:
Hello,

I'm storing my student objects in a list box and using the displaymember to
display to display the student first name and lastname.

lstStudents.DisplayMember = "LastFirst"

Dim tmpStudent As Student
For Each tmpStudent In mStudents
lstStudents.Items.Add(tmpStudent)
Next
lblCount.Text = mStudents.Count.ToString()

Now i need to extract the objects from the list based on user selection. I
know it has something to do with selecteditem but cant figure it out.

Help is appreciated

thanks

Nov 21 '05 #2
thanks

"Ken Tucker [MVP]" <Ke**********@discussions.microsoft.com> wrote in message
news:50**********************************@microsof t.com...
Hi,

Dim tmpStudent As Student

Try
tmpStudent = Ctype(lstStudents.selecteditem,student)
catch
' error getting data
end try

Ken
----------------------------------
"Troy" wrote:
Hello,

I'm storing my student objects in a list box and using the displaymember
to
display to display the student first name and lastname.

lstStudents.DisplayMember = "LastFirst"

Dim tmpStudent As Student
For Each tmpStudent In mStudents
lstStudents.Items.Add(tmpStudent)
Next
lblCount.Text = mStudents.Count.ToString()

Now i need to extract the objects from the list based on user selection.
I
know it has something to do with selecteditem but cant figure it out.

Help is appreciated

thanks

Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: claudel | last post by:
Hi I have a newb PHP/Javascript question regarding checkbox processing I'm not sure which area it falls into so I crossposted to comp.lang.php and comp.lang.javascript. I'm trying to...
4
by: Hari | last post by:
Basically I would like to downlod the visual basic 6.0 compiler, but i already have the vb.net compiler. I had to pay for the VB.net IDE, just wondering if I can get the vb 6.0 IDE for free or not....
0
by: David E. | last post by:
So as a programmer, what's the best thing to study? EJB? How much of the J2EE or Enterprise architecture is necessary to no? I guess I need a good overview for a newb like me... thanks.. --...
5
by: Alexandre | last post by:
Hi, Im a newb to dev and python... my first sefl assigned mission was to read a pickled file containing a list with DB like data and convert this to MySQL... So i wrote my first module which...
3
by: Walter | last post by:
But I'm stumped..... I've got a windows 2000 server and I am trying to set up PHPBB on it using a mysql database.. I am very inexperienced on this..... Ive installed mysql V4.0.20d and I can...
3
by: claudel | last post by:
Hi I have a newb PHP/Javascript question regarding checkbox processing I'm not sure which area it falls into so I crossposted to comp.lang.php and comp.lang.javascript. I'm trying to...
1
by: notbob | last post by:
Newb here! Using 4.0.20 on Slack. Slogging through the official manual. At 2.4.3 Securing the Initial MySQL Accounts, I'm finally stopped cold while trying to follow instructions. Here's what I...
6
by: Sean Berry | last post by:
Hello all I have build a list that contains data in the form below -- simplified for question -- myList = ,, ...] I have a function which takes value3 from the lists above and returns...
11
by: The_Kingpin | last post by:
Hi all, I'm new to C programming and looking for some help. I have a homework project to do and could use every tips, advises, code sample and references I can get. Here's what I need to do....
2
by: J | last post by:
Greetings Group- I'm trying to put together a pattern matching script that scans a directory tree for tif images contained in similar folder names, but running into a NewB problem already. Is it...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.