Latihan_07_36110030
A. Object-object dalam Latihan_07_36110030 :
1.
Object Label
Terdapat dua
label (yang bertuliskan masukkan angka dan hasil perhitungan).
2.
Object Textbox
Terdapat
tiga puluh textbox (lima status input; dua puluh lima status read only). Status
input digunakan untuk memasukkan nilai yang akan dimasukkan dalam perhitungan.
Status Read Only digunakan untuk menampilkan hasil perhitungan dari
angka-angkat yang sudah diinput.
3.
Object Button
Terdapat tiga
object button (Hitung 1, Hitung 2, dan Hitung 3). Untuk TextBox 6, 7, 29, dan
30 memiliki rumus yang berbeda tiap button hitung. Sedangkan TextBox 8 sampai
28 memilik rumus yang sama tiap button hitung. Jadi hanya TextBox 6, 7, 29, dan
30 yang hasilnya nanti berbeda untuk tiap button hitung karena rumusnya
berbeda.
B. Script Unique
Untuk button Hitung
1:
TextBox636110030.Text =
Val(TextBox336110030.Text) + Val(TextBox436110030.Text) +
Val(TextBox436110030.Text)
TextBox736110030.Text =
Val(TextBox136110030.Text) * Val(TextBox236110030.Text) +
Val(TextBox136110030.Text)
yhuya()
TextBox2936110030.Text =
Val(TextBox136110030.Text) / Val(TextBox236110030.Text) *
Val(TextBox336110030.Text)
TextBox3036110030.Text
= Val(TextBox136110030.Text) *
Val(TextBox236110030.Text)
- Val(TextBox536110030.Text)
Untuk button Hitung 2:
textBox636110030.Text =
Val(TextBox336110030.Text) / Val(TextBox436110030.Text) -
Val(TextBox436110030.Text)
TextBox736110030.Text =
Val(TextBox136110030.Text) - Val(TextBox236110030.Text) *
Val(TextBox136110030.Text)
yhuya()
TextBox2936110030.Text =
Val(TextBox136110030.Text) / Val(TextBox236110030.Text) -
Val(TextBox336110030.Text)
TextBox3036110030.Text =
Val(TextBox136110030.Text) * Val(TextBox236110030.Text) + Val(TextBox436110030.Text)
Untuk button Hitung 3:
TextBox636110030.Text =
Val(TextBox236110030.Text) + Val(TextBox536110030.Text) -
Val(TextBox436110030.Text)
TextBox736110030.Text =
Val(TextBox336110030.Text) * Val(TextBox236110030.Text) *
Val(TextBox136110030.Text)
yhuya()
TextBox2936110030.Text =
Val(TextBox136110030.Text) * Val(TextBox236110030.Text) -
Val(TextBox336110030.Text)
TextBox3036110030.Text = Val(TextBox136110030.Text) *
Val(TextBox236110030.Text) - Val(TextBox336110030.Text)
C. Even
HITUNG1_36110030_Click
D. Property
Property TextBox ==> ReadOnly=True
1.KLIK STAR KEMUDIAN PILIH
MICROSOFT VISUAL STUDIO 2008
2.KEMUDIAN KLIK NEW PROJECT PADA FILE
3.KEMUDIAN KLIK ADD UNTUK MENAMBAHKAN PROJECT
4. KEMUDIAN BUATLAH FORM SEPERTI DIBAWAH INI :
5.KEMUDIAN MASUKAN RUMUS :
Public Class
latihan_07_36110030
Private Sub yhuya()
TextBox836110030.Text =
Val(TextBox136110030.Text) + Val(TextBox336110030.Text) +
Val(TextBox536110030.Text) * Val(TextBox236110030.Text)
TextBox936110030.Text =
Val(TextBox236110030.Text) / Val(TextBox436110030.Text) /
Val(TextBox136110030.Text) * Val(TextBox536110030.Text)
TextBox1036110030.Text =
Val(TextBox536110030.Text) + Val(TextBox236110030.Text) *
Val(TextBox436110030.Text) / Val(TextBox536110030.Text)
TextBox1136110030.Text =
Val(TextBox236110030.Text) + Val(TextBox436110030.Text) ^
Val(TextBox236110030.Text) - Val(TextBox136110030.Text)
TextBox1236110030.Text =
Val(TextBox536110030.Text) + Val(TextBox336110030.Text) +
Val(TextBox336110030.Text) + Val(TextBox536110030.Text)
TextBox1336110030.Text =
Val(TextBox236110030.Text) * Val(TextBox536110030.Text) +
Val(TextBox436110030.Text) - Val(TextBox136110030.Text)
TextBox1436110030.Text =
Val(TextBox236110030.Text) + Val(TextBox136110030.Text) - Val(TextBox136110030.Text)
+ Val(TextBox136110030.Text)
TextBox1536110030.Text =
Val(TextBox236110030.Text) / Val(TextBox136110030.Text) -
Val(TextBox136110030.Text) + Val(TextBox136110030.Text)
TextBox1636110030.Text =
Val(TextBox236110030.Text) + Val(TextBox136110030.Text) *
Val(TextBox236110030.Text) - Val(TextBox136110030.Text)
TextBox1736110030.Text =
Val(TextBox536110030.Text) * Val(TextBox136110030.Text) -
Val(TextBox436110030.Text) / Val(TextBox136110030.Text)
TextBox1836110030.Text =
Val(TextBox436110030.Text) + Val(TextBox1336110030.Text) *
Val(TextBox536110030.Text) / Val(TextBox536110030.Text)
TextBox1936110030.Text =
Val(TextBox436110030.Text) + Val(TextBox236110030.Text) *
Val(TextBox436110030.Text) / Val(TextBox536110030.Text)
TextBox2036110030.Text =
Val(TextBox236110030.Text) * Val(TextBox436110030.Text) *
Val(TextBox236110030.Text) / Val(TextBox536110030.Text)
TextBox2136110030.Text =
Val(TextBox536110030.Text) / Val(TextBox336110030.Text) *
Val(TextBox336110030.Text) / Val(TextBox236110030.Text)
TextBox2236110030.Text =
Val(TextBox136110030.Text) * Val(TextBox236110030.Text) * Val(TextBox136110030.Text)
* Val(TextBox536110030.Text)
TextBox2336110030.Text =
Val(TextBox436110030.Text) ^ Val(TextBox136110030.Text) *
Val(TextBox336110030.Text) * Val(TextBox436110030.Text)
TextBox2436110030.Text =
Val(TextBox336110030.Text) * Val(TextBox436110030.Text) *
Val(TextBox536110030.Text) + Val(TextBox236110030.Text)
TextBox2536110030.Text =
Val(TextBox236110030.Text) * Val(TextBox336110030.Text) *
Val(TextBox236110030.Text) / Val(TextBox436110030.Text)
TextBox2636110030.Text =
Val(TextBox436110030.Text) * Val(TextBox336110030.Text) *
Val(TextBox436110030.Text) + Val(TextBox136110030.Text)
TextBox2736110030.Text =
Val(TextBox336110030.Text) * Val(TextBox236110030.Text) + Val(TextBox2136110030.Text)
- Val(TextBox236110030.Text)
TextBox2836110030.Text =
Val(TextBox436110030.Text) * Val(TextBox536110030.Text) *
Val(TextBox236110030.Text) + Val(TextBox336110030.Text)
TextBox2836110030.Text =
Val(TextBox236110030.Text) * Val(TextBox136110030.Text) *
Val(TextBox236110030.Text) + Val(TextBox336110030.Text)
End Sub
Private Sub hitung136110030_Click(ByVal
sender As Object,
ByVal e As
System.EventArgs) Handles hitung136110030.Click
TextBox636110030.Text = Val(TextBox336110030.Text)
+ Val(TextBox436110030.Text) + Val(TextBox436110030.Text)
TextBox736110030.Text =
Val(TextBox136110030.Text) * Val(TextBox236110030.Text) +
Val(TextBox136110030.Text)
yhuya()
TextBox2936110030.Text =
Val(TextBox136110030.Text) / Val(TextBox236110030.Text) *
Val(TextBox336110030.Text)
TextBox3036110030.Text =
Val(TextBox136110030.Text) * Val(TextBox236110030.Text) -
Val(TextBox536110030.Text)
End Sub
Private Sub hitung236110030_Click(ByVal
sender As Object,
ByVal e As
System.EventArgs) Handles hitung236110030.Click
TextBox636110030.Text =
Val(TextBox336110030.Text) / Val(TextBox436110030.Text) -
Val(TextBox436110030.Text)
TextBox736110030.Text =
Val(TextBox136110030.Text) - Val(TextBox236110030.Text) *
Val(TextBox136110030.Text)
yhuya()
TextBox2936110030.Text =
Val(TextBox136110030.Text) / Val(TextBox236110030.Text) -
Val(TextBox336110030.Text)
TextBox3036110030.Text =
Val(TextBox136110030.Text) * Val(TextBox236110030.Text) +
Val(TextBox436110030.Text)
End Sub
Private Sub hitung336110030_Click(ByVal
sender As Object,
ByVal e As
System.EventArgs) Handles hitung336110030.Click
TextBox636110030.Text =
Val(TextBox236110030.Text) + Val(TextBox536110030.Text) -
Val(TextBox436110030.Text)
TextBox736110030.Text =
Val(TextBox336110030.Text) * Val(TextBox236110030.Text) *
Val(TextBox136110030.Text)
yhuya()
TextBox2936110030.Text =
Val(TextBox136110030.Text) * Val(TextBox236110030.Text) -
Val(TextBox336110030.Text)
TextBox3036110030.Text =
Val(TextBox136110030.Text) * Val(TextBox236110030.Text) -
Val(TextBox336110030.Text)
End Sub
End Class
6.KEMUDIAN
UJI PROGRAM
7. JIKA SUDAH
BERHASIL Save program anda
8. selesai
0 komentar:
Posting Komentar