program visual basic

menghitung luas,panjang,lebar,dll,Dalam Visual Basic 6.0

Private Sub Command1_Click()
Text4.Text = 6 * Val(Text2.Text) * Val(Text2.Text)
Text5.Text = Val(Text1.Text) * Val(Text2.Text)
Text6.Text = 3.14 * Val(Text3.Text) * Val(Text3.Text)
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

menghitung program nilai UAS.

Private Sub Command1_Click()
Dim NA As Integer
UTS = Text1.Text
UAS = Text2.Text
ket = Text4.Text

NA = Val(0.4 * UTS) + Val(0.6 * UAS)
Text3.Text = NA

If NA >= 80 Then
Text4.Text = “baik”
Else
If NA >= 66 Then
Text4.Text = “CuKuP”
Else
If NA < 66 Then
Text4.Text = “Kurang”
End If
End If
End If

end sub

membuat program memilih data.

Private Sub Option1_Click()
Text1.Text = “SISTEM BASIS DATA”
Text2.Text = “4″
Text3.Text = “Keahlian”
End Sub
Private Sub Option2_Click()
Text1.Text = “SIM”
Text2.Text = “4″
Text3.Text = “Keahlian”
End Sub
Private Sub Option3_Click()
Text1.Text = “KALKULUS”
Text2.Text = “3″
Text3.Text = “Umum”
End Sub

MENGHITUNG PROGRAM GAJI KARYAWAN.

Private Sub Command1_Click()
If Text2.Text = “A” Then
Text4.Text = 1000
Text5.Text = 500
If Text3.Text > 40 Then
Text6.Text = (Text3.Text – 40) * 500
Text7.Text = Val(Text4.Text) + Val(Text5.Text) + Val(Text6.Text)
Else
Text6.Text = “TIDAK ADA LEMBURAN”
Text7.Text = Val(Text4.Text) + Val(Text5.Text)
End If
Else
If Text2.Text = “B” Then
Text4.Text = 1500
Text5.Text = 800
If Text3.Text > 40 Then
Text6.Text = (Text3.Text – 40) * 500
Text7.Text = Val(Text4.Text) + Val(Text5.Text) + Val(Text6.Text)
Else
Text6.Text = “TIDAK ADA LEMBURAN”
Text7.Text = Val(Text4.Text) + Val(Text5.Text)
End If
Else
If Text2.Text = “C” Then
Text4.Text = 2000
Text5.Text = 1000
If Text3.Text > 40 Then
Text6.Text = (Text3.Text – 40) * 500
Text7.Text = Val(Text4.Text) + Val(Text5.Text) + Val(Text6.Text)
Else
Text6.Text = “TIDAK ADA LEMBURAN”
Text7.Text = Val(Text4.Text) + Val(Text5.Text)
End If
End If
End If
End If

Text1.SetFocus
End Sub

Private Sub Command2_Click()
If MsgBox(“Anda Yakin Keluar”, vbOKCancel + vbDefaultButton2, “Tutup Aplikasi”) = vbOK Then
End
End If
End Sub

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s