hello. i m new 2 this forum and i m new 2 programming. so i have an elementary question(actually much more than one, but just 4 now)

how do i get a selected value from the listbox?

eg.
choice = list1.getselecteditem?

also, how do i declare variables in general, as in it can be shared between 2 different forms.


sorry if i sound really stupid, but i have2 start sumwhere. i tried looking 4 tutorials online, but i don't really understand the variables question.

and online tutorials i can't find the code 2 get selected value from listbox. i don't evn know what most of the properties do 4 the listbox.

my listbox has say, 5 values
qwerty
qwert
qwer
qwe
qw

how 2 make it when i select qwer, it return value 3.



thx alot in advance and sorry 4 spamming ur board with useless questions. i expect 2 learn much from u all.