TUGAS 4

4 Jan

KIROAH

Private Sub Cmdkeluar_Click()
End
End Sub

Private Sub CMDlagi_Click()
Txtkt.SetFocus
Txtkt = “”
Txtht = “”
Txtjk = “”
Txtjb = “”
Txtjt = “”
Txttotalp = “”
End Sub

Private Sub Cmdproses_Click()
kodetiket = Left(Txtkt.Text, 3)
If kodetiket = “BIM” Then
jeniskereta = “BIMA”
hargatiket = “50000”
jamberangkat = “16.00”
ElseIf kodetiket = “EKO” Then
jeniskereta = “EKONOMI”
hargatiket = “35000”
jamberangkat = “19.00”
ElseIf kodetiket = “MUT” Then
jeniskereta = “MUTIARA”
hargatiket = “23000”
jamberangkat = “17.00”
ElseIf kodetiket = “SEN” Then
jeniskereta = “SENJA”
hargatiket = “15000”
jamberangkat = “20.00”
End If
Txtkt.Text = kodetiket
Txtht.Text = hargatiket
Txtjk.Text = jeniskereta
Txtjb.Text = jamberangkat
Txtjt.SetFocus
End Sub

Private Sub Form_Activate()
Txtht.SetFocus
End Sub
Private Sub Txtjt_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Txttotalp.Text = Val(Txtht.Text) * Val(Txtjt.Text)
End If
End Sub

Advertisements

rumus perhitungan harga setelah diskon

7 Dec

perhitugn hrga stlah diskn

LOGIKA PERHITUNGAN SETELH DISKON

 

Private Sub Command3_Click()

Unload Me

End Sub

 

Private Sub Form_Load()

 

End Sub

 

Private Sub text1_keypress(keyascii As Integer)

If keyascii = 13 Then

Text2.SetFocus

End If

End Sub

 

Private Sub command1_click()

Text2.Text = Val(Text1.Text) * 0.1

Text3.Text = Val(Text1.Text) – Val(Text2.Text)

End Sub

Private Sub command2_click()

Text1.SetFocus

Text1 = “”

Text2 = “”

Text3 = “”

End Sub

microsoft vb 6.0

7 Dec

ms.vb 0

VISUAL BASIC 0.6

 

Private Sub Chkbold_Click()

If Chkbold.Value = 1 Then

lblteks.FontBold = True

Else

lblteks.FontBold = False

End If

End Sub

 

Private Sub Chkitalic_Click()

If Chkitalic.Value = 1 Then

lblteks.FontItalic = True

Else

lblteks.FontItalic = False

End If

End Sub

 

Private Sub Chkstrikeout_Click()

If Chkstrikeout.Value = 1 Then

lblteks.fontstrikeout = True

Else

lblteks.fontstrikeout = False

End If

End Sub

 

Private Sub Chkundrline_Click()

If chkundeline.Value = 1 Then

lblteks.FontUnderline = True

Else

lblteks.FontUnderline = False

End If

End Sub

 

 

Private Sub exit_Click()

Unload Me

End Sub

 

Private Sub Form_Load()

 

End Sub

 

Private Sub Optblue_Click()

lbltext.ForeColor = vbBlue

End Sub

 

Private Sub Optgreen_Click()

lblteks.ForeColor = vbGreen

End Sub

 

Private Sub Optred_Click()

lblteks.ForeColor = vbRed

End Sub

 

 

Private Sub Optyelow_Click()

lblteks , ForeColor = vbRed

End Sub

huruf mutu mahasiswa

7 Dec

huruf mtu mhasiswa

LOGIKA HURUF MUTU NILAI MAHASISWA

Private Sub combo1_change()

Dim nama, jurusan, hm As String

Select Case Combo1.Text

Case “1210063”

nama = “ria yuliana”

jurusan = “sistem informasi”

Case “12100073”

nama = “bela”

jurusan = “informatika”

Case “1210056”

nama = “lela”

jurusan = “informasi”

End Select

Text1.Text = nama

Text2.Text = jurusan

Text3.SetFocus

End Sub

 

 

Private Sub Command1_Click()

Dim na As Integer

Dim hs As String

quis = Val(Text3.Text)

uts = Val(Text5.Text)

uas = Val(Text6.Text)

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

Text7.Text = na

Select Case Text7.Text

Case Is > 80

hm = “a”

Case Is > 70

hm = “b”

Case Is > 60

hm = “c”

Case Is > 50

hm = “d”

Case Is < 50

hm = “e”

End Select

Text8.Text = hm

End Sub

 

Private Sub Command2_Click()

Combo1.SetFocus

Combo1.Text = “”

Text1.Text = “”

Text2.Text = “”

Text3.Text = “”

Text4.Text = “”

Text5.Text = “‘”

Text6.Text = “”

Text7.Text = “”

Text8.Text = “”

End Sub

 

Private Sub Command3_Click()

Unload Me

End Sub

 

Private Sub Form_Load()

Combo1.AddItem “1210063”

Combo1.AddItem “12100073”

Combo1.AddItem “12100056”

 

End Sub

 

Private Sub Text3_keypress(keyascii As Integer)

If keyascii = 13 Then

Text4.SetFocus

End If

End Sub

 

Private Sub Text4_keypress(keyascii As Integer)

If keyascii = 13 Then

Text5.SetFocus

End If

End Sub

 

Private Sub Text5_keypress(keyascii As Integer)

If keyascii = 13 Then

Text6.SetFocus

End If

End Sub

rumus perkalian 2 bilangan

7 Dec

vb 1

Rumus perkalian dua bilangan

Private Sub textnilai1_keypress(keyascii As Integer)

If keyascii = 13 Then

texthasil.SetFocus

End If

End Sub

 

Private Sub textnilai2_keyascii(keyascii As Integer)

If keyascii = 13 Then

End If

End Sub

Private Sub cmdhitung_click()

Dim A, B, C As Double

A = Val(textnilai1.Text)

B = Val(textnilai2.Text)

C = (A * B)

texthasil.Text = C

End Sub

Private Sub cmdbersih_click()

textnilai.SetFocus

textnilai1 = “”

textnilai2 = “”

texthasil = “”

End Sub

Private Sub cmdkeluar_click()

Unload Me

End Sub

 

kalkulator nilai

7 Dec

Kalkulator nilai

vb 2

Private Sub textnilai1_keypress(keyascii As Integer)

If keyascii = 13 Then

textnilai2.SetFocus

End If

End Sub

Private Sub textnilai2_keypress(keyascii As Integer)

If keyascii = 13 Then

textresult.SetFocus

End If

End Sub

Private Sub cmdplus_click()

Dim a, b, c As Double

a = Val(textnilai1.Text)

b = Val(textnilai2.Text)

c = (a + b)

textresult.Text = c

End Sub

Private Sub cmdminus_click()

Dim a, b, c As Double

a = Val(textnilai1.Text)

b = Val(textenilai2.Text)

c = (a – b)

textresult.Text = c

End Sub

Private Sub cmdkali_click()

Dim a, b, c As Double

a = Val(textnilai1.Text)

b = Val(textnilai2.tekt)

c = Val(a * b)

textresult.Text = c

End Sub

Private Sub cmdbagi_click()

Dim a, b, c As Double

a = Val(textnilai1.Text)

b = Val(textnilai2.Text)

c = (a / b)

textresul.Text = c

End Sub

Private Sub cmdfinish_click()

Unload Me

End Sub

 

 

 

 

 

 

Hello world!

29 Nov

Welcome to WordPress.com! This is your very first post. Click the Edit link to modify or delete it, or start a new post. If you like, use this post to tell readers why you started this blog and what you plan to do with it.

Happy blogging!