Mathematical table in

In this tutorial we will see how to create simple mathematical table in

I know many of you have done this application but getting problem while printing new line in Richtextbox ??

In visual basic vbcrlf  function moves current string to new line

e.g             str = str & vbCrLf


will move your string str to new line



Public Class Tables

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Dim n1, n2, i As Integer

Dim ar(40) As Integer

n1 = Val(TextBox1.Text)

n2 = Val(TextBox2.Text)

For i = 1 To n2

Dim a As Integer

a = n1 * i


RichTextBox1.Text = RichTextBox1.Text & n1 & ” * ” & i & ” = ” & a

RichTextBox1.Text = RichTextBox1.Text & vbCrLf



End Sub

End Class






Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s