Senin, 21 Maret 2016

Penghitung titik fokus wajan bolic

Listing program :

Private Sub Command1_Click()
Text1.Text = " "
Text2.Text = " "
Text3.Text = " "
Text4.Text = " "
End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text2.SetFocus
End If
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text3.Text = (Text1.Text ^ 2) / (16 * Text2.Text)
Text4.Text = Round(Int(Text1.Text ^ 2) / (16 * Text2.Text))
End If
End Sub

Flowchart