0% found this document useful (0 votes)
17 views

Modul Pratikum

This document contains the code for a form application that calculates totals from input values. It defines functions to calculate totals, clear fields, and display results. The form allows entering values, clearing fields, saving results, and closing the application.

Uploaded by

indah
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Modul Pratikum

This document contains the code for a form application that calculates totals from input values. It defines functions to calculate totals, clear fields, and display results. The form allows entering values, clearing fields, saving results, and closing the application.

Uploaded by

indah
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Formpratikum:

Kode:

Public Class Form1


Sub pesan()
Dim Ps2 As Decimal
Dim ps1 As Decimal
Dim ps As Decimal
Dim total As Decimal
Ps2 = Val(txtTS2.Text)
ps1 = Val(txtTS1.Text)
ps = Val(txtTS.Text)
total = Ps2 + ps1 + ps
Label6.Text = "Terima kasih: " & Chr(13) & "Program Studi Anda: " &
cboProdi.Text & "Jumlah PS2 :" & txtTS2.Text & "jumlah PS1 :&" &
txtTS1.Text & "jumlah PS :&" & txtTS.Text & "Total :&" & total
End Sub
Sub blank()
cboProdi.Text = ""
cboJenis.Text = ""
txtTS2.Text = ""
txtTS1.Text = ""
txtTS.Text = ""
End Sub
Private Sub cmdTutup_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles cmdTutup.Click
End
End Sub
Private Sub cmdHapus_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles cmdHapus.Click
Call blank()
Label6.Text = ""
End Sub

Private Sub cmdSimpan_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles cmdSimpan.Click
Call pesan()
Call blank()
End Sub
End Class

You might also like