JagoVB
20th November 2011, 11:48 PM
Gan ane udah koding VB nih
berikut kodingnya
Code:
Public Class jendelalimas
Dim a As Double
Dim t As Double
Dim tlimas As Double
Dim volum As Double
Private Sub segi3_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles segi3.CheckedChanged
If segi3.Checked Then
volum = ((a * t) / 2 * tlimas / 3)
End If
End Sub
Private Sub segi4_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles segi4.CheckedChanged
If segi4.Checked Then
volum = ((a * t) * tlimas / 3)
End If
End Sub
Private Sub hit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles hit.Click
a = alas.Text
t = tinggi.Text
tlimas = tinggilimas.Text
vol.Text = volum
End Sub
End Class
Cman pas ane klik tombol hitung hasilnya 0 yah
pas di klik yg kedua kali baru hasilnya nongol
biar jelas liat SS
Spoiler for SS:
Klikan Pertama
http://cdn-u.kaskus.us/61/h3i7tmss.jpg
Klikan Ke 2
http://cdn-u.kaskus.us/61/zfxwotht.jpg
salah dimana yah???
ama 1 pertanyaa lagi
Code:
Koding buat nutup jendela(bukan applikasi,bukan me.close) apa yah lupa saya
maaf klo saya banyak tanya
</div>
berikut kodingnya
Code:
Public Class jendelalimas
Dim a As Double
Dim t As Double
Dim tlimas As Double
Dim volum As Double
Private Sub segi3_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles segi3.CheckedChanged
If segi3.Checked Then
volum = ((a * t) / 2 * tlimas / 3)
End If
End Sub
Private Sub segi4_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles segi4.CheckedChanged
If segi4.Checked Then
volum = ((a * t) * tlimas / 3)
End If
End Sub
Private Sub hit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles hit.Click
a = alas.Text
t = tinggi.Text
tlimas = tinggilimas.Text
vol.Text = volum
End Sub
End Class
Cman pas ane klik tombol hitung hasilnya 0 yah
pas di klik yg kedua kali baru hasilnya nongol
biar jelas liat SS
Spoiler for SS:
Klikan Pertama
http://cdn-u.kaskus.us/61/h3i7tmss.jpg
Klikan Ke 2
http://cdn-u.kaskus.us/61/zfxwotht.jpg
salah dimana yah???
ama 1 pertanyaa lagi
Code:
Koding buat nutup jendela(bukan applikasi,bukan me.close) apa yah lupa saya
maaf klo saya banyak tanya
</div>