Design form seperti gambar dibawah ini
lalu ketikan printah dibawah ini sesuaipada sub-subnya
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim halaman As Byte
For halaman = 1 To 10
PANGKAT.Items.Add(halaman)
BILANGAN.Items.Add(halaman)
Next
End Sub
Private Sub PANGKAT_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PANGKAT.SelectedIndexChanged
Dim xh As Double = 1
For i = 1 To Val(PANGKAT.Text)
xh = xh * BILANGAN.Text
Next i
HASIL.Text = xh
End Sub
End Class
http:/mesran.net
http:/trianiarista.blogspot.com
lalu ketikan printah dibawah ini sesuaipada sub-subnya
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim halaman As Byte
For halaman = 1 To 10
PANGKAT.Items.Add(halaman)
BILANGAN.Items.Add(halaman)
Next
End Sub
Private Sub PANGKAT_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PANGKAT.SelectedIndexChanged
Dim xh As Double = 1
For i = 1 To Val(PANGKAT.Text)
xh = xh * BILANGAN.Text
Next i
HASIL.Text = xh
End Sub
End Class
http:/mesran.net
http:/trianiarista.blogspot.com
0 komentar:
Posting Komentar