Question #20862
design a vb form, the user will enter a number & then click the button, the result should display in list box the multiplication table of your number (by the numbers 1 to 10)...
what is the code for this question??
1
Expert's answer
2012-12-20T07:39:47-0500
Public Class Form1Private Sub txtUpperlimit_TextChanged(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles txtUpperlimit.TextChangedresultListBox.Items.Clear()End Sub''' <summary>''' Calculate button''' </summary>''' <param name="sender"></param>''' <param name="e"></param>''' <remarks></remarks>Private Sub btnCalculate_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles btnCalculate.ClickTryDim counter As Integer = 1resultListBox.Items.Clear()resultListBox.Items.Add("N" + vbTab + "N^2" + vbTab +"N^3")Do Until counter > Integer.Parse(txtUpperlimit.Text)resultListBox.Items.Add(counter.ToString() + vbTab + Math.Pow(counter,2).ToString() + vbTab + Math.Pow(counter, 3).ToString())counter += 1LoopCatch ex As ExceptionMessageBox.Show("Incorrect data")End TryEnd SubEnd Class

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!
LATEST TUTORIALS
APPROVED BY CLIENTS