Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim btnBack As Button
Dim btnCalc As Button
Dim txtMaxGPH As EditText
Dim txtMaxSpeed As EditText
Dim lblMaxGPD As Label
Dim txtSpeedSet As EditText
Dim txtStroke As EditText
Dim lblGPD As Label
Dim MaxGPD As Int
Dim SpeedSet As Int
Dim Percent As Int
Dim FullGPD As Int
Dim SetGPD As Int
End Sub
Sub btnCalc_Click
MaxGPD = (txtMaxGPH.text * 24)
lblMaxGPD.Text = (Round2(MaxGPD,2)) 'Makes Max GPD at Max Speed and Stroke
Percent = (txtStroke.Text *.01) 'Makes Percent Stroke
SpeedSet = (txtSpeedSet.text / txtMaxSpeed.Text)
FullGPD = (SpeedSet * lblMaxGPD.Text)
SetGPD = (FullGPD * Percent)
lblGPD.Text= (Round2(SetGPD,2))
End Sub