I have simple array on this form but want to tie in another array for pictures.. Combobox select the Phone and this set the array to fit the other text boxes name,address,br ithday. Now I want add a picture into the mix.
Any Ideas ??
Code:
Option Explicit On
Option Strict On
Imports Microsoft.VisualBasic.ControlChars
Imports System.Convert
Public Class frmMain
Dim Phone() As String = {"(864) 463-1040", "(864) 463-1039", "(864) 463-1038", "(864) 463-1037", "(864) 463-1036", "(864) 463-1035", "(864) 463-1034", "(864) 463-1033", "(864) 463-1032", "(864) 463-1031", "(864) 463-1030"}
Dim FName() As String = {"John Smith", "Wild Bill", "Smokin Joe", "Fred Sampson", "Hank Will", "Eddie Weathers", "Smart Guy", "Bob Willis", "Led Light", "Happy Dazes"}
Dim Address() As String = {"1010 Wood Street", "124 Wild Road", "Beef Jerky Lane", "Big Guy Road", "Drink Street", "BreakWind Road", "Twoby Four Road", "Ditch Road", "Bright Lane", "Lost Road"}
Dim BirthDay() As String = {"7/4/2001", "5/5/1969", "9/12/1970", "9/02/2002", "4/4/1960", "5/25/1962", "1/10/1962", "1/06/1996", "2/22/2002", "12/12/1969"}
Dim imgPictures() As Image
Private Sub cboPhone_SelectedIndexChanged(sender As System.Object, e As System.EventArgs) Handles cboPhone.SelectedIndexChanged
Dim Num As Integer
Num = cboPhone.SelectedIndex
txtName.Text = FName(Num)
txtAddress.Text = Address(Num)
txtBirth.Text = BirthDay(Num)
End Sub
Private Sub btnExit_Click(sender As System.Object, e As System.EventArgs) Handles btnExit.Click
Me.Close()
End Sub
Private Sub btnClear_Click(sender As System.Object, e As System.EventArgs) Handles btnClear.Click
cboPhone.Text = ""
txtName.Text = ""
txtAddress.Text = ""
txtBirth.Text = ""
End Sub
End Class
Comment