Page 155 - Open Soource Technologies 304.indd
P. 155
Unit 6: VB Control Structure
Object Property Setting
FrmTable Text Multiplication Table
BtnDisplay Text Display Table
LstTable Font Courier New
Private Sub btnDisplay_Click(...) Handles btnDisplay.Click
Dim row, entry As String
lstTable.Items.Clear()
For j As Integer = 1 To3
row = “”
For k As Integer = 1 To3
entry = j & “ x “ & k & “ = “ & (j * k)
row &= entry & “ “
Next
lstTable.Items.Add(row)
Next
End Sub
[Run, and press the button.]
LOVELY PROFESSIONAL UNIVERSITY 149