Tugas Visual Basic

1.

Ren4

Private Sub Cmdhit_Click()

Txtdiskn.Text = Val(TxthrgP.Text) * 0.1

TxthrgA.Text = Val(TxthrgP.Text) – Val(Txtdiskn.Text)

End Sub

 

Private Sub Cmdlgi_Click()

TxthrgP = “”

Txtdiskn = “”

TxthrgA = “”

End Sub

 

Private Sub Cmdout_Click()

End

End Sub

2.

Ren1

Private Sub txtag1_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txtag2.SetFocus

End If

End Sub

 

Private Sub txtag2_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Txtag3.SetFocus

End If

End Sub

 

Private Sub Txtag3_KeyPress(KeyAscii As Integer)

Txtag3.Text = Val(txtag1.Text) * Val(txtag2.Text)

End Sub

 

Private Sub Cmdhtg_Click()

Txtag3.Text = Val(txtag1.Text) * Val(txtag2.Text)

End Sub

 

Private Sub Cmddel_Click()

txtag1 = “”

txtag2 = “”

Txtag3 = “”

End Sub

 

Private Sub Cmdkel_Click()

End

End Sub

3.

Ren2

Private Sub optgreen_Click()

Lbljd.ForeColor = vbGreen

End Sub

 

Private Sub optblue_Click()

Lbljd.ForeColor = vbBlue

End Sub

 

Private Sub optred_Click()

Lbljd.ForeColor = vbRed

End Sub

 

Private Sub Optyellow_Click()

Lbljd.ForeColor = vbYellow

End Sub

 

 

Private Sub Chkitl_Click()

If Chkitl.Value = 1 Then

Lbljd.FontItalic = True

Else

Lbljd.FontItalic = False

End If

End Sub

 

Private Sub Chkbld_Click()

If Chkbld.Value = 1 Then

Lbljd.FontBold = True

Else

Lbljd.FontBold = False

End If

End Sub

 

Private Sub Chkudr_Click()

If Chkudr.Value = 1 Then

Lbljd.FontUnderline = True

Else

Lbljd.FontUnderline = False

End If

End Sub

 

Private Sub Chkstrk_Click()

If Chkstrk.Value = 1 Then

Lbljd.FontStrikethru = True

Else

Lbljd.FontStrikethru = False

End If

End Sub

 

Private Sub Cmdklwr_Click()

End

End Sub

4.

Ren5

Private Sub Txtni1_Change()

If KeyAscii = 13 Then

Txtni2.SetFocus

End If

End Sub

 

Private Sub Cmdkali_Click()

Txtjml.Text = Val(Txtni1.Text) * Val(Txtni2)

End Sub

 

Private Sub Cmdbagi_Click()

Txtjml.Text = Val(Txtni1.Text) / Val(Txtni2)

End Sub

 

Private Sub Cmdkrng_Click()

Txtjml.Text = Val(Txtni1.Text) – Val(Txtni2.Text)

End Sub

 

Private Sub Cmdtmbh_Click()

Txtjml.Text = Val(Txtni1.Text) + Val(Txtni2.Text)

End Sub

 

Private Sub Cmdlagi_Click()

Txtni1 = “”

Txtni2 = “”

Txtjml = “”

End Sub

 

Private Sub Cmdout_Click()

End

End Sub

5.

Ren3

Private Sub Txtgpok_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Txttjgn.SetFocus

End If

End Sub

 

Private Sub Txttjgn_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Txtptgn.SetFocus

End If

End Sub

 

 

Private Sub Cmdpros_Click()

Txtgjkt.Text = Val(Txtgpok.Text) + Val(Txttjgn.Text) – Val(Txtptgn.Text)

Txtpjk.Text = Val(Txtgjkt.Text) * 0.1

Txtgbrs.Text = Val(Txtgjkt.Text) – Val(Txtpjk.Text)

End Sub

 

Private Sub Cmdlg_Click()

Txtgpok = “”

Txttjgn = “”

Txtptgn = “”

Txtgjkt = “”

Txtpjk = “”

Txtgbrs = “”

End Sub

 

Private Sub Cmdkel_Click()

End

End Sub

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