Rabu, 23 Maret 2016

EFISIENSI TRANSFORMATOR



1. Diagram Flowchart
Berikut adalah proses program dengan menggunakan Diagram Flowchart pada program Visual Basic 


2. Kodingan Rumus Menggunakan Visual Basic
Private Sub Command1_Click()
Text1.Text = ""
Text2.Text = ""
Label4.Caption = ""
Label5.Visible = False


End Sub

Private Sub Command2_Click()
If Text1.Text = "" Then
MsgBox ("Isi Kolom dengan lengkap")
ElseIf Text2.Text = "" Then
MsgBox ("Isi Kolom dengan lengkap")
Else


Label4.Caption = (Val(Text1.Text) / Val(Text2.Text) * 100)
Label5.Visible = True
End If


End Sub

Private Sub Command4_Click()
Text1.Visible = True
Text2.Visible = True
Command1.Visible = True
Command2.Visible = True
Label2.Visible = True
Label3.Visible = True
Label4.Visible = True


End Sub