Advertisement
Guest User

Untitled

a guest
Nov 18th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.79 KB | None | 0 0
  1. Public Class Form1
  2. Dim Height As Double
  3.  
  4. Dim Width As Double
  5.  
  6. Dim Length As Double
  7. Dim base As Double
  8. Dim i As Integer
  9.  
  10. Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
  11.  
  12. End Sub
  13.  
  14. Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
  15. Dim i As Integer
  16.  
  17.  
  18. Height = Val(TextBox1.Text)
  19.  
  20. Width = Val(TextBox2.Text)
  21.  
  22. Length = Val(TextBox3.Text)
  23.  
  24. TextBox4.Text = Height * Width * Length
  25.  
  26.  
  27. End Sub
  28.  
  29. Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
  30.  
  31. End Sub
  32.  
  33. Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
  34. Width = Val(TextBox2.Text)
  35.  
  36. Length = Val(TextBox3.Text)
  37. TextBox4.Text = Width * Length
  38. End Sub
  39.  
  40. Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
  41.  
  42. Height = Val(TextBox1.Text)
  43.  
  44. Width = Val(TextBox2.Text)
  45.  
  46. Length = Val(TextBox3.Text)
  47.  
  48. TextBox4.Text = Height * Width * Length * 6
  49.  
  50. End Sub
  51.  
  52. Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
  53. base = Val(TextBox5.Text)
  54. Height = Val(TextBox1.Text)
  55. TextBox4.Text = Height * base =
  56.  
  57. End Sub
  58. Public Sub ree(sender As Object, e As KeyPressEventArgs) Handles TextBox1.KeyPress, TextBox2.KeyPress, TextBox3.KeyPress, TextBox4.KeyPress, TextBox5.KeyPress
  59. e.Handled = Not Char.IsNumber(e.KeyChar)
  60.  
  61.  
  62. e.Handled = Not Char.IsNumber(e.KeyChar)
  63.  
  64.  
  65. e.Handled = Not Char.IsNumber(e.KeyChar)
  66.  
  67.  
  68. e.Handled = Not Char.IsNumber(e.KeyChar)
  69.  
  70.  
  71. e.Handled = Not Char.IsNumber(e.KeyChar)
  72.  
  73.  
  74. End Sub
  75. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement