VB lab 2 - , ByVal e As System. EventArgs ) Handles

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Tyler Fox IE 148 HW 7 Option Strict On Public Class Form1 Dim s(100) As Integer Dim Index As Integer Private Sub AddToolStripMenuItem_Click( ByVal sender As Object , ByVal e As System. EventArgs ) Handles AddToolStripMenuItem.Click ListBox1.Items.Add(txtName.Text) End Sub Private Sub ListBox1_SelectedIndexChanged( ByVal sender As Object , ByVal e As System. EventArgs ) Handles ListBox1.SelectedIndexChanged Index = ListBox1.SelectedIndex lblIndex.Text = FormatNumber(Index) If Index > -1 Then txtName.Text = CStr (ListBox1.Items(Index)) txtPhone.Text = CStr (ListBox1.Items(Index)) End If End Sub Private Sub ModifyToolStripMenuItem_Click( ByVal sender As Object
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: , ByVal e As System. EventArgs ) Handles ModifyToolStripMenuItem.Click Index = ListBox1.SelectedIndex lblIndex.Text = FormatNumber(Index) ListBox1.Items.RemoveAt(Index) ListBox1.Items.Insert(Index, txtName.Text) If ListBox1.Items.Count = 1 Then S(1) = 1 Else For i = Index To 99 s(i) = s(i + 1) Next End If End Sub Private Sub DeleteToolStripMenuItem_Click( ByVal sender As Object , ByVal e As System. EventArgs ) Handles DeleteToolStripMenuItem.Click Index = ListBox1.SelectedIndex ListBox1.Items.RemoveAt(Index) End Sub End Class Tyler Fox IE 148 HW 7...
View Full Document

Page1 / 2

VB lab 2 - , ByVal e As System. EventArgs ) Handles

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online