by John (4 Submissions)
Category: Math/Dates
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Tue 26th February 2008
Date Added: Mon 8th February 2021
Rating:
(1 Votes)
To Find out how many beers it will take for a person to reach the legal limit of of .08
Dim intMale As Integer
Dim intFemale As Integer
Dim Female As String
Dim Male As String
Private Sub Label3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lblWeight.Click
End Sub
Private Sub Label5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lblDrunk.Click
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Me.Close()
End Sub
Private Sub TextBox3_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub TextBox6_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtGender.TextChanged
End Sub
Private Sub txtDrunk_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtDrunk.TextChanged
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'Calculate Male
intMale = (Val(0.58 * (txtWeight.Text / 0.00245)))
'Calculate Female
intFemale = (Val(0.49 * (txtWeight.Text / 0.00245)))
If (Val(txtGender.Text) = Male) Then
intMale = True
End If
If intMale = True Then
txtBeer.Text = (((292.5 / (intMale * 0.08))) * 100)
Else
txtBeer.Text = (((292.5 / (intFemale * 0.08))) * 100)
End If
End Sub
Private Sub lblPints_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lblGender.Click
End Sub
End Class
No comments have been posted about To Find out how many beers it will take for a person to reach the legal limit of of .08. Why not be the first to post a comment about To Find out how many beers it will take for a person to reach the legal limit of of .08.