13. Visual Basic Calculator - Tutorial VB 2010

preview_player
Показать описание
How to make a calculator in Visual Basic 2010
Рекомендации по теме
Комментарии
Автор

Thank you for posting this video, I'm a 10th grader and this really helped me a lot! Most videos out there were confusing but this was easy!

franx
Автор

Nevermind, i fixed it! i just removed all the Val()'s like Form1.TextBox1.Text & Tall.Text
instead of Val(Form1.TextBox1.Text & Tall.Text)
can't read value of something with decimal point even though its a Unicode character? WTF? anyway, works like a charm! love you! subscribed!

duodot
Автор

@duodot
Thanks .. I'm glad that you figured it out .. This is the way we learn .. all the best.

itsaji
Автор

@duodot
You need a variable "flag" (type boolean). whose initial value is FALSE.
When ever the user press the decimal button check the flag, If it is FALSE then add a decimal point to the number and set the flag as TRUE (as long as the flag is true no more decimal points are allowed in same number). Set the flag back to FALSE when user clicks any operators "+, =, *, /" or C, CE so he can enter second number with decimal point.

itsaji
Автор

I have a question. Why did you make a sub in the module for the variable "arithmetic" just to make the textbox clear when you press the button. Couldn't you have done this under the sub buttonclick: textbox1.text = "". so when they click the button the textbox clears. Please answer asap. I don't understand the purpose of a module.

DanShash
Автор

Nice coding!!! And thank you for having normal music :D

breezyleaf
Автор

I followed your instructions step by step exactly as you demonstrated, i just changed some of the subroutine and variable names, but still the decimal point doesn't work properly... i can set it, but once i click another button to set the first decimal it just removes the decimal point and nothing else happens... do you have any idea why this happens? and do you know of a fix? I've checked and checked again for bugs, errors, and mishaps, but its flawless...still it doesn't work...

duodot
Автор

@ItsAji Why does the multiply button not working? I've copied and double checked everything, and for example, if I type 2 x 2, it would just be 2.

MinecraftDude
Автор

do you have a video add 4 test scores and get the average total of scores. i sure would appreciate it
Thanks

denvercress
Автор

@ItsAji
could you plz tell me hw to make 000 and 0000 appear i.e when ever you need one hundred, u click on 1 and then on the 000 button.
Thanks for your tutorials it really helped

EmmanuelAbbah
Автор

@itsaji This does only prevent me from inserting multiple decimal points in the same number, and that works, but that is unfortunately not solving my problem... The problem is that once the point is inserted and when i then push any number it removes the point and i have to push the same button again in order to for it to show up... it seems that it reads the textbox1.text as integer and denies me to use decimals, but if i change oper to string and value1 to decimal it changes nothing...

duodot
Автор

my vb express 2010 doesn't show the toolbar on the left with all buttons and other things. how do I fix it?

TheWordBecameFleshJ
Автор

@deans1243
Plz make sure that you are using "Microsoft Visual Basic 2010 Express", form your code it appears that you are using "C# editor".

itsaji
Автор

whenever i double click anything to go to the code it doesnt look anything like yours but nomatter what i click the code is always the same?? pleas help

deans
Автор

@ShayAxelod22 dude... I REALY LOVE YOUR MAKE MORE VIDEOS!!! subscribed!

keep it up!

ShayAxelod
Автор

apparently Error 1 "Type character '&' does not match declared data type what should I do

highkea
Автор

the form.oper, what is oper in 2013 vb ?

knsrulz
Автор

@itsAji

Hi dude, I have a question. Can you comment here the formula on how to continously operate? What I mean is this. Example 4+5+7+2-3-56*5/4 = Help please.

macaranasadrian
Автор

@MrBejta
Goto module ShowValue() 06:04 in the video and change the statement like (added "Val" function)

Form1.TextBox1.Text = Val(Form1.TextBox1.Text & Button.Text)

itsaji
Автор

which song is this ? please give me a link.also loved your tutorial.thanks alot.

growwithdesign