Selasa, 06 April 2010

Bujur Sangkar

















Coding Program Bujur Sangkar

Private Sub txt_out_Change()

txt_out.Enabled = False

End Sub

Private Sub cmd_ulang_Click()

txt_in.Text = ""

txt_out.Text = ""

opt_luas.Value = True

txt_in.SetFocus

End Sub

Private Sub cmd_keluar_Click()

Unload Me

End Sub

Private Sub txt_in_KeyPress(KeyAscii As Integer)

If KeyAscii >= 65 And KeyAscii <= 90 Or KeyAscii >= 97 And KeyAscii <= 122 Then

KeyAscii = 0


Else

End If

End Sub

Sub rumus()

If opt_luas.Value = True Then

lbl_in.Caption = "Sisi"

txt_out.Text = Val(txt_in.Text) * Val(txt_in.Text)

ElseIf opt_sisi.Value = True Then

lbl_in.Caption = "Luas"

txt_out.Text = Sqr(Val(txt_in.Text))

End If

End Sub

Private Sub txt_out_Change()

txt_out.Enabled = False

End Sub





Tidak ada komentar:

Posting Komentar