kalkulator

Private sub cmdfinish_click()
unload me
end sub

private sub txtnilai1_keypress (keyascii as integer)
if keyascii = 13 then
txtnilai2.setfocus
end if
end sub

private sub txtnilai2_keypress (keyascii as integer)
if keyascii = 13 then
txtresuslt.setfocus
end if
end sub

private sub cmdplus_click()
dim a, b, c as double
a=val (txtnilai1.text)
b=val (txtnilai2.text)
c=(a+b)
txtresult.text=c
end sub

private sub cmdminus_click()
dim a, b, c as double
a=val (txtnilai1.text)
b=val (txtnilai2.text)
c=(a-b)
txtresult.text=c
end sub

private sub cmdkali_click()
dim a, b, c as double
a=val (txtnilai1.text)
b=val (txtnilai2.text)
c=(a*b)
txtresult.text=c
end sub

private sub cmdbagi_click()
dim a, b, c as double
a=val (txtnilai1.text)
b=val (txtnilai2.text)
c=(a/b)
txtresult.text=c
end sub

private sub cmdreset_click()
txtnilai1.setfocus
txtnilai1=””
txtnilai2=””
txtresult=””
end sub

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

%d blogger menyukai ini: