• We just launched and are currently in beta. Join us as we build and grow the community.

How to Calculate Water Tank Capacity Using VB.Net

Wuffy

Algorithm Tactician
W Rep
0
0
0
Rep
0
W Vouches
0
0
0
Vouches
0
Posts
107
Likes
10
Bits
2 MONTHS
2 2 MONTHS OF SERVICE
LEVEL 1 500 XP
In this tutorial I will teach you how to calculate the capacity of a water tank using vb.net. You maybe have water tanks at home or in any infrastructure; it is a large chamber used for storing water and it comes in variety styles. And you might need to calculate the water tank to make sure that your water source provides enough water. Take a look at the procedure below to find out how.

Creating Application

Step 1

Open Microsoft Visual Studio 2015 and create a new windows form application.
2019-01-16_4_0.png

Step 2

Do the form just like shown below.
2019-01-18.png

Step 3

Double click the “Calculate” button and do the following code to calculate the tank capacity when the button is clicked.
  1. Private

    Sub

    btnCalculate_Click(sender As

    Object

    , e As

    EventArgs) Handles btnCalculate.Click
  2. Dim

    height As

    Double
  3. Dim

    width As

    Double
  4. Dim

    depth As

    Double
  5. Dim

    capacity As

    Double
  6. height = txt_height.Text
  7. width = txt_width.Text
  8. depth = txt_depth.Text
  9. capacity = (height * width * depth) / 100
  10. ListBox1.Items.Clear()
  11. ListBox1.Items.Add("The capacity of the water tank is "

    & capacity & " Liters"

    )
  12. End

    Sub

Output
2019-01-18_2.png


For any questions about this article. You can contact me @
Email – [email protected]
Mobile No. – 09305235027 – TNT
Or feel free to comment below.

 

452,292

323,526

323,535

Top