Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Class Form1
- Dim Height As Double
- Dim Width As Double
- Dim Length As Double
- Dim base As Double
- Dim i As Integer
- Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
- End Sub
- Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
- Dim i As Integer
- Height = Val(TextBox1.Text)
- Width = Val(TextBox2.Text)
- Length = Val(TextBox3.Text)
- TextBox4.Text = Height * Width * Length
- End Sub
- Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
- End Sub
- Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
- Width = Val(TextBox2.Text)
- Length = Val(TextBox3.Text)
- TextBox4.Text = Width * Length
- End Sub
- Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
- Height = Val(TextBox1.Text)
- Width = Val(TextBox2.Text)
- Length = Val(TextBox3.Text)
- TextBox4.Text = Height * Width * Length * 6
- End Sub
- Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
- base = Val(TextBox5.Text)
- Height = Val(TextBox1.Text)
- TextBox4.Text = Height * base =
- End Sub
- Public Sub ree(sender As Object, e As KeyPressEventArgs) Handles TextBox1.KeyPress, TextBox2.KeyPress, TextBox3.KeyPress, TextBox4.KeyPress, TextBox5.KeyPress
- e.Handled = Not Char.IsNumber(e.KeyChar)
- e.Handled = Not Char.IsNumber(e.KeyChar)
- e.Handled = Not Char.IsNumber(e.KeyChar)
- e.Handled = Not Char.IsNumber(e.KeyChar)
- e.Handled = Not Char.IsNumber(e.KeyChar)
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement