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

Sunday, April 10, 2016

Kilograms to Pounds Converter in Visual Basic.NET

A simple program in Visual Basic.NET that will ask the user to give the weight in kilograms and then it will convert it into Pounds 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

        Kilograms = Val(TextBox1.Text)

        Pounds = (Kilograms * 2.20462262)

        Label3.Text = Kilograms & " Kg(s) is equivalent to " & Math.Round(Pounds, 2) & " Lbs(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