Completely Free .NET word API

Resources » Code Snippets » Winforms Controls

GUI Multiplication Table

Updated: Category: Winforms Controls
Author: Member Level: GoldPoints: 7

GUI Multiplication Table

This code is shows how to create multiplication table in Open a new windows project, place 2 textbox, list box and a button. In the button click write the following code.

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If TextBox1.Text <> "" And TextBox2.Text <> "" Then
' First Number is used to get the value from
' which number the multiplication start ie 1
' Second number used to get the end value
' ie 10,20
Dim firstNumber As Integer = Val(TextBox1.Text)
Dim secondNumber As Integer = Val(TextBox2.Text)
Dim multplier As Integer = 2 ' modify these value for 3,4
' for the corresponding table
Dim answer As Integer
Do While multplier < 3
For i = firstNumber To secondNumber
answer = i * multplier
' 1* 2= 2
'All the result will get appended to the listbox
lstTables.Items.Add(i & " * " & multplier & " = " & answer)
multplier = multplier + 1
Exit Sub
End If
End Sub

Did you like this resource? Share it with your friends and show your love!

Responses to "GUI Multiplication Table"
Author: Abhay Kumar Raut  10 Nov 2009   Member Level: Gold   Points : 1
Hi Dharmaraj,

Can you please add some comment lines in the code?



Post Comment:

  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:   Sign In to fill automatically.
    Email: (Will not be published, but required to validate comment)

    Type the numbers and letters shown on the left.

    Submit Article     Return to Article Index
    Subscribe to Subscribers
    Active Members
    TodayLast 7 Daysmore...

    Awards & Gifts
    Talk to Webmaster Tony John

    Online Members

    Phagu Mahato
    Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India