Open a visual basic program, then make is Form1, Form1 add the following objects:
- 3 labels
- 2 command button,
- 2 text box
then fill propertiesnya as follows:
Objek Name Caption
Label1 Label1 MasukanX
Label2 Label2 MasukanY
Label3 Labelhasil Hasil
Text1 TxtY Kosongkan
Text2 txtX Kosongkan
Command1 cmdHitung Hitung
Command2 Cmdkeluar Keluar
See the following picture:
Then type the following code listing:
Then type the following code listing:
Private sub cmdHItung_click()
Labelhasil.caption=val(txtX.text) ^val (txtY.text)
End sub
Private sub cmdkeluar_click()
End
End sub
hopefully easy to understand
No comments:
Post a Comment