Hello..I'm almost done with this however and I posted it on Visual 3/4/6 and VBA and they directed me to this forum.. The selectedindex is not recognized in VB 2010 and ("co") is apparently should not be infinity?
Please help I been working on this for a while
Please help I been working on this for a while
Code:
Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim strcountries() As String = {"United States", "France"} For intsubsript As Integer = 0 To 1 LstCountries.Items.Add(strcountries(intsubsript)) Next intsubsript End Sub Private Sub LstCountries_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LstCountries.SelectedIndexChanged Dim strcity() As String = {"Washington", "Paris"} Dim strIndex As String = LstCountries.SelectedIndex txtcity.Text = strcity(strIndex).ToString("co") End Sub End Class
Comment