Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim intRow As Integer
Dim intCol As Integer
Dim mintDistance(,) As Integer = {{75, 90}, {9, 25}, {23, 56}, {6, 12}}
If ComboBox1.SelectedIndex <> -1 And ComboBox2.SelectedIndex <> -1 Then
intRow = ComboBox1.SelectedIndex
intCol = ComboBox2.SelectedIndex
Label1.Text = CStr(mintDistance(intRow, intCol))
Else
MessageBox.Show("Select Departure and Destination", "Choose Cities", MessageBoxButtons.OK, MessageBoxIcon.Information)
ComboBox1.Focus()
End If
This post has been edited by PsychoCoder: 01 April 2010 - 09:55 AM
Reason for edit:: Added code tags

New Topic/Question
Reply




MultiQuote



|