Berikut struktur navigasi:
Berikut flow chart:
Berikut source code :
If Text1.Text = "" Then
MsgBox ("Masukan Nilai Dengan Lengkap")
ElseIf Text2.Text = "" Then
MsgBox ("Masukan Nilai Dengan Lengkap")
ElseIf Text3.Text = "" Then
MsgBox ("Masukan Nilai Dengan Lengkap")
Else
Text9.Text = Round(Cos((Text3.Text) * ((22 / 7) / 180)), 3)
Text8.Text = Round(Sin((Text3.Text) * ((22 / 7) / 180)), 3)
Text7.Text = Round(Int(Text1.Text) / (Text2.Text), 3)
Text6.Text = Round(Int(Text1.Text) * (Text2.Text), 3)
Text5.Text = Round(Int(Text6.Text) * (Text8.Text), 3)
Text4.Text = Round(Int(Text6.Text) * (Text9.Text), 3)
End If
End Sub
Private Sub Command2_Click(Index As Integer)
If Text1.Text = "" Then
MsgBox ("Masukan Nilai Dengan Lengkap")
ElseIf Text2.Text = "" Then
MsgBox ("Masukan Nilai Dengan Lengkap")
ElseIf Text3.Text = "" Then
MsgBox ("Masukan Nilai Dengan Lengkap")
Else
Text9.Text = Round(Cos((Text3.Text) * ((22 / 7) / 180)), 3)
Text8.Text = Round(Sin((Text3.Text) * ((22 / 7) / 180)), 3)
Text7.Text = Round(Int(Text1.Text) / (Text2.Text), 3)
Text6.Text = Round(Int((Math.Sqr(3)) * (Text1.Text) * (Text2.Text)), 3)
Text5.Text = Round(Int(Text6.Text) * (Text8.Text), 3)
Text4.Text = Round(Int(Text6.Text) * (Text9.Text), 3)
End If
End Sub
Private Sub Command3_Click(Index As Integer)
Text9.Text = ""
Text8.Text = ""
Text7.Text = ""
Text6.Text = ""
Text5.Text = ""
Text4.Text = ""
Text3.Text = ""
Text2.Text = ""
Text1.Text = ""
End Sub
Private Sub Command4_Click(Index As Integer)
Form2.Show
End Sub
Private Sub Text1_keypress(keyascii As Integer)
If (keyascii >= Asc("a") & Chr(13) And keyascii <= Asc("z") & Chr(13) Or (keyascii >= Asc("A") & Chr(13) And keyascii <= Asc("Z") & Chr(13) Or keyascii = vbKeySpace)) Then
MsgBox "Masukan Nilai Angka", , "Perhatian"
keyascii = 0
End If
End Sub
Private Sub Text2_keypress(keyascii As Integer)
If (keyascii >= Asc("a") & Chr(13) And keyascii <= Asc("z") & Chr(13) Or (keyascii >= Asc("A") & Chr(13) And keyascii <= Asc("Z") & Chr(13) Or keyascii = vbKeySpace)) Then
MsgBox "Masukan Nilai Angka", , "Perhatian"
keyascii = 0
End If
End Sub
Private Sub Text3_keypress(keyascii As Integer)
If (keyascii >= Asc("a") & Chr(13) And keyascii <= Asc("z") & Chr(13) Or (keyascii >= Asc("A") & Chr(13) And keyascii <= Asc("Z") & Chr(13) Or keyascii = vbKeySpace)) Then
MsgBox "Masukan Nilai Angka", , "Perhatian"
keyascii = 0
End If
End Sub
Tampilan awal
Tampilan hasil perhitungan 1 fasa
Tampilan hasil perhitungan 3 fasa
Tampilan info
Terimakasih. :)
Tidak ada komentar:
Posting Komentar