Как конвертировать строки в целые с CInt()

Программа

Введите два integer-подобных числа. Они будут сложены.

Код:

STATIC PUBLIC SUB Main()
  hForm AS Fmain
  hForm = NEW Fmain
  hForm.show
END

PUBLIC SUB Button1_Click()
  x AS Integer
  x = CInt(TextBox1.Text) + CInt(TextBox2.Text)
'this throws an error if the input does not exactly
'looks like an integer!
'so better use val() if you're not sure.
  Label2.Text = CStr(x)
END

Исходник

Download