Showing posts with label pounds to kilograms in visual basic.net. Show all posts
Showing posts with label pounds to kilograms in visual basic.net. Show all posts

Sunday, April 10, 2016

Pounds To Kilograms Converter in Visual Basic.NET

A program that I wrote in Visual Basic.NET that will ask the user to give a value in Pounds and then it will convert it into Kilograms equivalent.

Add me at Facebook my address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.




Sample Program Output


Program Listing

Public Class Form1

    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Label3.Visible = False
    End Sub

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Label3.Visible = True

        Dim Kilograms As Decimal

        Dim Pounds As Decimal

        Pounds = Val(TextBox1.Text)

        Kilograms = (Pounds * 0.45359237)

        Label3.Text = Pounds & " Lbs(s) is equivalent to " & Math.Round(Kilograms, 2) & " Kg(s)"

    End Sub

    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
        TextBox1.Text = ""
        Label3.Text = ""
        TextBox1.Focus()
    End Sub
End Class