Private Sub btnCalc_Click(ByVal sender As System.Object, ByVal e As _
            System.EventArgs) Handles btnCalc.Click
  Dim Number, Sum, i, MyInteger As Integer
  Dim Newline As String
  Newline = Chr(13) & Chr(10)   ' znak nowej linii
  Sum = 0                       ' czyszczenie sumy
  MyInteger = 1
  Number = CInt(txtNumber.Text)
  txtResult.Text = ""

  For i = 1 To Number           ' początek pętli
    Sum += MyInteger
    txtResult.Text += CStr(i) & "  " & CStr(Sum) & Newline
    MyInteger += 2
  Next

End Sub
