Form1
Programnya :
Public Class Form1
Function Jumlah(ByVal Bill As Integer, ByVal Bil2 As Integer) As Integer
Jumlah = Bill + Bil2
Return Jumlah
End Function
Private Sub Function1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Function1.Click
txtHasil.Text = Jumlah(Bill:=TextBox1.Text, Bil2:=TextBox2.Text)
End Sub
Private Sub Function2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Function2.Click
TextBox5.Text = Jumlah(Bill:=TextBox6.Text, Bil2:=TextBox7.Text)
End Sub
Private Sub FunctionKali_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FunctionKali.Click
TextBox3.Text = perkalian(Bill:=TextBox8.Text, Bil2:=TextBox4.Text)
End Sub
Private Sub Form2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles formbtn.Click
Form2.Show()
End Sub
End Class
Form2
Programnya:
Public Class Form2
Private Sub FunctionKali_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FunctionKali.Click
TextBox3.Text = perkalian(Bill:=TextBox1.Text, Bil2:=TextBox2.Text)
End Sub
End Class
Module Module1
Public Function perkalian(ByVal Bill As Integer, ByVal Bil2 As Integer) As Integer
perkalian = Bill * Bil2
Return perkalian
End Function
End Module
1 komentar:
wajib di coba nih.. thanks infonya sob!
Posting Komentar