Sabtu, 16 April 2011

Contoh Program Vb.net dengan menggunakan modul



Public Class Form2

Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
h = TextBox1.Text
b = TextBox2.Text
Call hitung()
TextBox3.Text = hasil

End Sub
End Class





Module Modul3

'variabel public
Public nama As String, hasil, h, b As Integer
Sub tampilnama()
nama = " Adit Bangkit Prastya "
End Sub

Sub hitung()
hasil = Val(h) * Val(b)
End Sub

End Module

Tidak ada komentar:

Posting Komentar