Free Games Forum
Free Games Games Forums Music Forums TV Forums

  Free Games Forum Home FORUM
HOME
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN
Rules & FAQ RULES / FAQ
REPORT SPAM

Free Games Forum: Game Technology: Visual Basic / VB:
how to make a calculator?

 

 


robinx
Enthusiast


Aug 10, 2005, 10:08 PM

Post #1 of 6 (456 views)
Shortcut
how to make a calculator? Can't Post

how to make a calculator?



Jaymzanator
Enthusiast


Aug 11, 2005, 10:24 PM

Post #2 of 6 (445 views)
Shortcut
Re: [robinx] how to make a calculator? [In reply to] Can't Post

ive made 2 different 1's

1 with all buttons and the other with just the 4 times thingys and 2 text boxes

textbox1 is easy reply if u want the code

click here if ur a noob


(17:20) Taz:
and tazg is lol'in at you all the way from canada
(17:21) James:
lol canadians


robinx
Enthusiast


Aug 12, 2005, 5:21 PM

Post #3 of 6 (438 views)
Shortcut
Re: [Jaymzanator] how to make a calculator? [In reply to] Can't Post

i want the code for the textbox calculator i know that is used in rs2 clients.

yeah send the code on the textbox calculator plzSmile


naitsabes
Newbie

Aug 13, 2005, 8:58 PM

Post #4 of 6 (433 views)
Shortcut
Re: [robinx] how to make a calculator? [In reply to] Can't Post

Made a simple code


Code
 Select Case YourOption   
Case "/"
Calculate = Val(FirstNumber) / Val(SecoundNumber)
Case "*"
Calculate = Val(FirstNumber) * Val(SecoundNumber)
Case "+"
Calculate = Val(FirstNumber) + Val(SecoundNumber)
Case "-"
Calculate = Val(FirstNumber) - Val(SecoundNumber)
End Select



(This post was edited by naitsabes on Aug 13, 2005, 9:00 PM)


robinx
Enthusiast


Aug 15, 2005, 1:04 AM

Post #5 of 6 (421 views)
Shortcut
Re: [naitsabes] how to make a calculator? [In reply to] Can't Post

it says compile err syntax err


(This post was edited by robinx on Aug 15, 2005, 4:36 AM)


Cruel__Machine
Senior Member


Aug 15, 2005, 6:09 AM

Post #6 of 6 (418 views)
Shortcut
Re: [robinx] how to make a calculator? [In reply to] Can't Post

Best way is to use the MS Script control I think.
You can just put something like:

ScriptControl1.ExecuteStatement "MsgBox(" & text1.text & ")"

Text1 would contain something like "4 / 3 * 43 *2" and it'd execute it and therefore compute it. I believe that should work. But feel FREE to learn about the scripting control before you dive into it.

I remember making a tutorial on it... here it is:

http://vtforce.com/cruel/msscript


EOP
___________________________
"If evolution were true, I'd have a self-lubricating hand."

Programmers: http://Cruels.net

 
 
 


Search for (options) Web Design by Web Ideas - Page loaded in: 0.13 s on (CGI/1.1)