jump to navigation

Tugas Visual Basic 24 Januari 2012

Posted by anggit_susanto in Uncategorized.
add a comment

Private Sub cbonpm_click()

Dim nama, jurusan, hm As String

Select Case cbonpm.Text

Case “11100142″

nama = “anggit susanto”

jurusan = “SistemInformasi”

Case “09100113″

nama = “ropiq”

jurusan = “SistemInformasi”

Case “09100114″

nama = “parto”

jurusan = “SistemInformasi”

Case “09200111″

nama = “Ririn”

jurusan = “ManajemenInformatika”

Case “09200121″

nama = “nurma”

jurusan = “ManajemenInformatika”

Case “09200115″

nama = “mahbub”

jurusan = “ManajemenInformatika”

Case “09300105″

nama = “arep”

jurusan = “TeknikInformatika”

Case “09300106″

nama = “vivi”

jurusan = “TeknikInformatika”

Case “09300114″

nama = “septi”

jurusan = “TeknikInformatika”

Case “09300118″

nama = “sudarsono”

jurusan = “TeknikInformatika”

End Select

txtnama.Text = nama

txtjurusan.Text = jurusan

txtquis.SetFocus

End Sub

Private Sub cmdbatal_Click(Index As Integer)

cbonpm.SetFocus

cbonpm.Text = “”

txtnama.Text = “”

txtjurusan.Text = “”

txtquis.Text = “”

txttugas.Text = “”

txtuts.Text = “”

txtuas.Text = “”

txthm.Text = “”

txtna.Caption = “”

End Sub

Private Sub cmdkeluar_Click()

anggit = MsgBox(“amda yakin ingin keluar?…..”, vbYesNo, “Awas!!!!!!!!”)

If anggit = vbYes Then

End

Else

cbonpm.SetFocus

End If

End Sub

Private Sub cmdproses_Click(Index As Integer)

Dim na As Integer

Dim hm As String

nilai1 = Val(txtquis.Text)

nilai2 = Val(txttugas.Text)

nilai3 = Val(txtuts.Text)

nilai4 = Val(txtuas.Text)

na = (nilai1 + nilai2 + nilai3 + nilai4) / 4

txtna.Caption = na

If Val(txtna.Caption) >= 80 Then

txthm.Text = “A”

ElseIf Val(txtna.Caption) >= 70 Then

txthm.Text = “B”

ElseIf Val(txtna.Caption) >= 60 Then

txthm.Text = “C”

ElseIf Val(txtna.Caption) >= 50 Then

txthm.Text = “D”

Else

txthm.Text = “E”

End If

End Sub

Private Sub Desing_Click()

MsgBox (“anggit(11100142)”)

End Sub

Private Sub Form_Load()

cbonpm.AddItem “09100112″

cbonpm.AddItem “09100113″

cbonpm.AddItem “09100114″

cbonpm.AddItem “09200111″

cbonpm.AddItem “09200121″

cbonpm.AddItem “09200115″

cbonpm.AddItem “09300105″

cbonpm.AddItem “09300106″

cbonpm.AddItem “09300114″

cbonpm.AddItem “09300118″

End Sub

Private Sub keluar_Click()

anggit = MsgBox(“amda yakin ingin keluar?…..”, vbYesNo, “Awas!!!!!!!!”)

If anggit= vbYes Then

End

Else

cbonpm.SetFocus

End If

End Sub

Private Sub txtquis_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txttugas.SetFocus

End If

End Sub

Private Sub txttugas_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txttugas.SetFocus

End If

End Sub

Tugas VB 24 Januari 2012

Posted by anggit_susanto in Uncategorized.
add a comment

Private Sub Combo1_Click()

Dim GAPOK, PAJAK, TUNJANGAN, TOTAL As Variant

Select Case Combo1.Text

Case “I”

GAPOK = 1500000

TUNJANGAN = 150000

Case “II”

GAPOK = 2000000

TUNJANGAN = 200000

Case “III”

GAPOK = 2500000

TUNJANGAN = 250000

Case “IV”

GAPOK = 3000000

TUNJANGAN = 300000

Case Else

GAPOK = 0

TUNJANGAN = 0

End Select

TOTAL = GAPOK + TUNJANGAN

PAJAK = TOTAL * 0.1

Text3.Text = GAPOK

Text4.Text = TUNJANGAN

Text5.Text = PAJAK

Text6.Text = TOTAL – PAJAK

End Sub

Private Sub Command1_Click()

Text1.SetFocus

Text1.Text = “”

Text2.Text = “”

Text3.Text = “”

Text4.Text = “”

Combo1.Text = “”

Text5.Text = “”

Text6.Text = “”

End Sub

Private Sub Command2_Click()

Text1.SetFocus

Text1.Text = “”

Text2.Text = “”

Text3.Text = “”

Text4.Text = “”

Combo1.Text = “”

Text5.Text = “”

Text6.Text = “”

End Sub

Private Sub Command3_Click()

Unload Me

End Sub

Private Sub Form_Load()

Combo1.AddItem “I”

Combo1.AddItem “II”

Combo1.AddItem “III”

Combo1.AddItem “IV”

Text3.Enabled = False

Text4.Enabled = False

Text5.Enabled = False

Text6.Enabled = False

Label9.Enabled = False

Label10.Enabled = False

Label11.Enabled = False

Label12.Enabled = False

rp1.Enabled = False

rp2.Enabled = False

rp3.Enabled = False

rp4.Enabled = False

End Sub

Private Sub Label2_Click()

End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text2.SetFocus

End If

End Sub

TUGAS VISUAL BASIC 24 Januari 2012

Posted by anggit_susanto in Uncategorized.
add a comment

TUGAS 1

Private Sub Optred_Click()

‘membuat teks berwarna merah

lblteks.ForeColor = vbRed

End Sub

Private Sub Chkbold_Click()

‘membuat teks tebal

If chkbold.Value = 1 Then

lblteks.FontBold = True

Else

lblteks.FontBold = False

End If

End Sub

Private Sub cmdexit_Click()

End

End Sub

TUGAS 2
Private Sub CMDHITUNG_Click()

Dim a, b, c As Double

Txtb.Text = Val(Txta.Text) * 0.1

Txtc.Text = Val(Txta.Text) * Val(Txtb.Text)

End Sub

Private Sub CMDKELUAR_Click()

End

End Sub

Private Sub CMDULANGI_Click()

Txta = “”

Txtb = “”

Txtc = “”

End Sub

TUGAS 3

Private Sub CMDKELUAR_Click()

End

End Sub

Private Sub cmdPROSES_Click()

Dim a, b, c, d, e, f As Double

Txtd.Text = Val(Txta.Text) + Val(Txtb.Text) – Val(Txtc.Text)

Txte.Text = Val(Txtd.Text) * (0.1)

Txtf.Text = Val(Txtd.Text) – Val(Txte.Text)

End Sub

Private Sub CMDULANGI_Click()

Txta = “”

Txtb = “”

Txtc = “”

Txtd = “”

Txte = “”

Txtf = “”

End Sub

TUGAS 4

Private Sub Cbonpm_Change()

Dim nama, jurusan, HM As String

Select Case Cbonpm.Text

Case “11100168”

nama = “SUDARSONO”

jurusan = “Sistem Informasi”

Case “11100092”

nama “Debi Lisdia Paramita”

jurusan “Sistem Informasi”

Case “11100156”

nama “Nurul Khotimah”

jurusan “sistem informasi”

Case “11100146”

nama “mahbub ihwani”

jurusan “sistem informasi”

End Select

txtnama.Text = nama

txtjurusan.Text = jurusan = jurusan

txtquis.SetFocus

End Sub

Private Sub Cmdbatal_Click()

Cbonpm.SetFocus

Cbonpm.Text = “”

txtnama.Text = “”

txtjurusan.Text = “”

txtquis.Text = “”

txttugas.Text = “”

txtuts.Text = “”

txtuas.Text = “”

Txtna.Text = “”

txthm.Text = “”

End Sub

 

Private Sub Cmdkeluar_Click()

Unload Me

End Sub

 

Private Sub Cmdproses_Click()

Dim NA As Integer

Dim HM As String

quis = Val(txtquis.Text)

tugas = Val(txtquis.Text)

uts = Val(txtquis.Text)

uas = Val(txtquis.Text)

NA = (quis + tugas + uts + uas) / 4

Txtna.Text = NA

 

Select Case Txtna.Text

calse ls > 80

HM = “a”

calse ls > 70

HM = “b”

calse ls > 60

HM = “c”

calse ls > 50

HM = “d”

calse ls > 50

HM = “e”

End Sub

Private Sub Form_Load()

Cbonpm.AddItem “09100027”

Cbonpm.AddItem “09200048”Cbonpm.AddItem “09300024”

End Sub

Private Sub txtquis_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txttugas.SetFocus

End If

End Sub

Private Sub txttugas_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txtuts.SetFocus

End If

End Sub

Private Sub txtuts_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txtuas.SetFocus

End If

End Sub

Hello world! 19 Januari 2012

Posted by anggit_susanto in Uncategorized.
1 comment so far

Welcome to WordPress.com. After you read this, you should delete and write your own post, with a new title above. Or hit Add New on the left (of the admin dashboard) to start a fresh post.

Here are some suggestions for your first post.

  1. You can find new ideas for what to blog about by reading the Daily Post.
  2. Add PressThis to your browser. It creates a new blog post for you about any interesting  page you read on the web.
  3. Make some changes to this page, and then hit preview on the right. You can always preview any post or edit it before you share it to the world.