Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- nomainwin
- button #calculator.btn, "Click Me", [btnClick], UL, 20,155,120,30
- statictext #calculator.num1, "Vul een getal 1 in:", 20, 40, 120, 30
- statictext #calculator.num2, "Vul een getal 2 in:", 20, 80, 120, 30
- statictext #calculator.reken,"Vul een rekenteken in +,-,/,* :",20,120,200,30
- TextBox #calculator.getal1, 200,30,40,30
- TextBox #calculator.getal2, 200,70,40,30
- TextBox #calculator.rekenteken, 200,110,40,30
- TextBox #calculator.txt, 200,150,40,30
- ' this doesn't work
- Dim rekenteken$(4) = "+","-","/","*"
- ComboBox #calculator.rekenteken, 200,210,40,30
- WindowWidth = 300 : WindowHeight = 200
- open "Calculator" for window as #calculator
- #calculator "trapclose [quit]"
- nClicks = 0
- wait
- [quit]
- close #calculator
- end
- [btnClick]
- nClicks = nClicks + 1
- print #calculator.getal1,"!contents? nGetal1"
- print #calculator.getal2,"!contents? nGetal2"
- print #calculator.rekenteken,"!contents? sRekenteken$"
- If sRekenteken$ = "+" Then
- uitkomst = nGetal1 + nGetal2
- print #calculator.txt, str$(uitkomst)
- End If
- if sRekenteken$ = "-" then
- uitkomst = nGetal1 + nGetal2
- print #calculator.txt, str$(uitkomst)
- End If
- wait
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement