Rabu, 12 Agustus 2015

EKOS SETIAWAN

Hasil karya saya di Microsoft Visual Basic. Pada waktu sekolah di SMK Taruna Jaya Prawira Tuban.
Dapat di download DISINI
  1.  Percobaan 1 Microsoft Visual Basic. Biodata siswa





2.  Percobaan 2 Microsoft Visual Basic Biodata Siswa







Calculator2

Dim A As Double
Dim B As Double
Dim O As String
Dim H As Double
__________________________________________________________
Private Sub cmd0_Click()
txtDisplay.Text = txtDisplay.Text & "0"
End Sub
__________________________________________________________
Private Sub cmd1_Click()
txtDisplay.Text = txtDisplay.Text & "1"
End Sub
__________________________________________________________
Private Sub cmd2_Click()
txtDisplay.Text = txtDisplay.Text & "2"
End Sub
__________________________________________________________
Private Sub cmd3_Click()
txtDisplay.Text = txtDisplay.Text & "3"
End Sub
__________________________________________________________
Private Sub cmd4_Click()
txtDisplay.Text = txtDisplay.Text & "4"
End Sub
__________________________________________________________
Private Sub cmd5_Click()
txtDisplay.Text = txtDisplay.Text & "5"
End Sub
__________________________________________________________
Private Sub cmd6_Click()
txtDisplay.Text = txtDisplay.Text & "6"
End Sub
__________________________________________________________
Private Sub cmd7_Click()
txtDisplay.Text = txtDisplay.Text & "7"
End Sub
__________________________________________________________
Private Sub cmd8_Click()
txtDisplay.Text = txtDisplay.Text & "8"
End Sub
__________________________________________________________
Private Sub cmd9_Click()
txtDisplay.Text = txtDisplay.Text & "9"
End Sub
__________________________________________________________
Private Sub cmdAC_Click()
txtDisplay.Text = ""
End Sub
__________________________________________________________
Private Sub cmdBAGI_Click()
A = Val(txtDisplay.Text)
O = "/"
txtDisplay.Text = ""
End Sub
__________________________________________________________
Private Sub cmdKALI_Click()
A = Val(txtDisplay.Text)
O = "*"
txtDisplay.Text = ""
End Sub
__________________________________________________________
Private Sub cmdKOMA_Click()
txtDisplay.Text = txtDisplay.Text & "."
End Sub
__________________________________________________________
Private Sub cmdKURANG_Click()
A = Val(txtDisplay.Text)
O = "-"
txtDisplay.Text = ""
End Sub
__________________________________________________________
Private Sub cmdSD_Click()
B = Val(txtDisplay.Text)
Select Case O
    Case "+": txtDisplay.Text = A + B
    Case "-": txtDisplay.Text = A - B
    Case "*": txtDisplay.Text = A * B
    Case "/": txtDisplay.Text = A / B
End Select
__________________________________________________________
A = 0
B = 0
End Sub
__________________________________________________________
Private Sub cmdTAMBAH_Click()
A = Val(txtDisplay.Text)
O = "+"
txtDisplay.Text = ""

End Sub


4. Hitungan persegi dan segitiga

 

 

Hitungan persegi dan segitiga

Private Sub cmdSD1_Click()
lbLH1.Caption = Val(txt1.Text) * Val(txt2.Text)
lbLH2.Caption = 2 * (Val(txt1.Text) + Val(txt2.Text))
End Sub
__________________________________________________________
Private Sub cmdSD2_Click()
lbLH3.Caption = Val(txt3.Text) * Val(txt4.Text)
lbLH4.Caption = 1 / 2 * Val(txt3.Text) * Val(txt4.Text)
End Sub
__________________________________________________________
Private Sub txt1_Change()
txt1.Text = txt1.Text & ""
End Sub
__________________________________________________________
Private Sub txt2_Change()
txt2.Text = txt2.Text & ""
End Sub
__________________________________________________________
Private Sub txt3_Change()
txt3.Text = txt3.Text & ""
End Sub
__________________________________________________________
Private Sub txt4_Change()
txt4.Text = txt4.Text & ""

End Sub

5. NOTEPAD dengan microsoft visual basic


Notepat visual basic

Private Sub Form_Resize()
Text1.Width = Form1.ScaleWidth
Text1.Height = Form1.ScaleHeight
End Sub
__________________________________________________________
Private Sub mnAboutNotepad_Click()
Form2.Show
End Sub
__________________________________________________________
Private Sub mnExit_Click()
End
End Sub
__________________________________________________________
Private Sub mnFont_Click()
CommonDialog1.ShowFont
End Sub
__________________________________________________________
Private Sub mnNew_Click()
Text1.Text = ""
End Sub
__________________________________________________________
Private Sub mnOpen_Click()
CommonDialog1.ShowOpen
End Sub
__________________________________________________________
Private Sub mnPrint_Click()
CommonDialog1.ShowPrinter
End Sub
__________________________________________________________
Private Sub mnSaveAs_Click()
CommonDialog1.ShowSave
End Sub
__________________________________________________________
Private Sub mnWordWarp_Click()
mnWordWarp.Checked = Not (mnWordWarp.Checked)
End Sub
__________________________________________________________
Private Sub Text1_Change()
mnUndo.Enabled = True
End Sub


6. Hitungan 1-10 dengan Timer

Hitungan

Private Sub Command1_Click()
If Command1.Caption = "START" Then
Command1.Caption = "STOP"
____________________________________________
Timer1.Enabled = True
End If
End Sub
____________________________________________
Private Sub Image3_Click()
End Sub
_____________________________________________
Private Sub Label1_Click()
Else
Command1.Caption = "STOP"
Label1.Caption = 0 - 11
Timer1.Enabled = False
End If
End Sub
End Sub
_____________________________________________
Private Sub Timer1_Timer()
If Label1.Caption = 0 Then
Label1.Caption = 1
ElseIf Label1.Caption = 1 Then
Label1.Caption = 2
ElseIf Label1.Caption = 2 Then
Label1.Caption = 3
ElseIf Label1.Caption = 3 Then
Label1.Caption = 4
ElseIf Label1.Caption = 4 Then
Label1.Caption = 5
ElseIf Label1.Caption = 5 Then
Label1.Caption = 6
ElseIf Label1.Caption = 6 Then
Label1.Caption = 7
ElseIf Label1.Caption = 7 Then
Label1.Caption = 8
ElseIf Label1.Caption = 8 Then
Label1.Caption = 9
ElseIf Label1.Caption = 9 Then
Label1.Caption = 10
ElseIf Label1.Caption = 10 Then
MsgBox "selamat jalan kawan"
End If
End Sub