Its not a very tough job if you know all the commands of visual basic.
to make a calculator:-
- 1st open visual basic
- then open standard.exe
- then make your layout as you wish
- then make the add,subtract,multiply and divide buttons
- put the follwing command for the add button
NUM1 = Text1.Text
NUM2 = Text2.Text
RESULT = Val(NUM1) + Val(NUM2)
Text3.Text = RESULT
- put the following command for the subtract button
NUM1 = Text1.Text
NUM2 = Text2.Text
RESULT = Val(NUM1) - Val(NUM2)
Text3.Text = RESULT
- put the followingcommand for the multiply button
NUM1 = Text1.Text
NUM2 = Text2.Text
RESULT = Val(NUM1) * Val(NUM2)
Text3.Text = RESULT
- put the following command for divide button
NUM1 = Text1.Text
NUM2 = Text2.Text
RESULT = Val(NUM1) / Val(NUM2)
Text3.Text = RESULT
DONE!!!!!
for a better calculator,you can download it from here
No comments:
Post a Comment