G
Guest
I am new to .net can someone teranslate the foloowing in .net
Ls and Lt will be listboxes.
Sub ListCpSelected(Ls As Control, Lt As Control)
'Copies selected items from one list to another
Dim I As Integer
I = 0
While (I < Ls.ListCount) --- I beleive is - listbox.selectedindices.count
If Ls.Selected(I) Then I am using if listbox.selecteditem(I) I get
Invalid cast Exception was unhandled
Lt.AddItem Ls.List(I)
I = I + 1
Wend
End Sub
Ls and Lt will be listboxes.
Sub ListCpSelected(Ls As Control, Lt As Control)
'Copies selected items from one list to another
Dim I As Integer
I = 0
While (I < Ls.ListCount) --- I beleive is - listbox.selectedindices.count
If Ls.Selected(I) Then I am using if listbox.selecteditem(I) I get
Invalid cast Exception was unhandled
Lt.AddItem Ls.List(I)
I = I + 1
Wend
End Sub