RSS

Visual Basic latihan1

09 Feb

Private Sub Form_Load()

CboJenis.AddItem “VB”

CboJenis.AddItem “MO”

CboJenis.AddItem “PCL”

End Sub

Private Sub CboJenis_Click()

If CboJenis.Text = “VB” Then

txtnama.Text = “Visual Basic”

ElseIf CboJenis.Text = “MO” Then

txtnama.Text = “Microsoft Office”

Else

txtnama.Text = “Pascal”

End If

txtnama.Enabled = False

End Sub

Private Sub CmdBatal_Click()

Txtno.text = “”

Txtnama.text = “”

CboJenis.text = “”

OptPagi.Value = False

OptMalam.Value = False

Txtbiaya.text = “”

txtno.SetFocus

End Sub

Private Sub CmdKeluar_Click()

a = MsgBox(“Yakin Keluar Program ?”, vbYesno + vbQuestion, “Konfirmasi”)

If a = vbyes Then

Unload Me

End If

End Sub

Private Sub Form_Activate()

txtno.SetFocus

End Sub

Private Sub OptPagi_Click()

txtbiaya.Text = 500000

txtbiaya.Enabled = False

End Sub

Private Sub OptMalam_Click()

txtbiaya.Text = 550000

txtbiaya.Enabled = False

End Sub

Private Sub Timer1_Timer()

Label1.Caption = Date + Time

End Sub

 

 
Tinggalkan komentar

Ditulis oleh pada Februari 9, 2011 in Yuli Bicara Tentang Teknologi

 

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

 
%d blogger menyukai ini: