Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Class Form1
- Dim broj1, broj2 As Integer
- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
- If Len(TextBox1.Text) < 1 Or Len(TextBox2.Text) < 1 Then
- MsgBox("Unesi broj!")
- Else
- Label1.Text = broj1 + broj2
- End If
- End Sub
- Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
- If IsNumeric(TextBox1.Text) Then
- broj1 = CInt(TextBox1.Text)
- Else
- MsgBox("Unesi broj!")
- End If
- End Sub
- Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox2.TextChanged
- If IsNumeric(TextBox2.Text) Then
- broj2 = CInt(TextBox2.Text)
- Else
- MsgBox("Unesi broj!")
- End If
- End Sub
- Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
- If Len(TextBox1.Text) < 1 Or Len(TextBox2.Text) < 1 Then
- MsgBox("Unesi broj!")
- Else
- Label1.Text = broj1 - broj2
- End If
- End Sub
- Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
- If Len(TextBox1.Text) < 1 Or Len(TextBox2.Text) < 1 Then
- MsgBox("Unesi broj!")
- Else
- Label1.Text = broj1 / broj2
- End If
- End Sub
- Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
- If Len(TextBox1.Text) < 1 Or Len(TextBox2.Text) < 1 Then
- MsgBox("Unesi broj!")
- Else
- Label1.Text = broj1 * broj2
- End If
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment