Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Visual Basic [VB] (http://www.go4expert.com/articles/visual-basic-tutorials/)
-   -   Simple Calculator in Visual Basic 6 (http://www.go4expert.com/articles/simple-calculator-visual-basic-6-t23106/)

shabbir 26Aug2010 19:12

Simple Calculator in Visual Basic 6
 
2 Attachment(s)
A Simple Windows Like Calculator in Visual Basic 6. See the Screenshot.

http://imgs.g4estatic.com/calculator/calc.png

Keyboard Shortcuts

Ascii code of '0' is '48' and is a short cut key to '0'
Ascii code of '1' is '49' and is a short cut key to '1'
Ascii code of '2' is '50' and is a short cut key to '2'
Ascii code of '3' is '51' and is a short cut key to '3'
Ascii code of '4' is '52' and is a short cut key to '4'
Ascii code of '5' is '53' and is a short cut key to '5'
Ascii code of '6' is '54' and is a short cut key to '6'
Ascii code of '7' is '55' and is a short cut key to '7'
Ascii code of '8' is '56' and is a short cut key to '8'
Ascii code of '9' is '57' and is a short cut key to '9'
Ascii code of 'Ctrl+O' is '15' and is a short cut key to '00'
Ascii code of '.' is and 46 is a short cut key to'.'
Ascii code of '+' is and 43 is a short cut key to'+'
Ascii code of '-' is and 45 is a short cut key to '-'
Ascii code of '*' is and 42 is a short cut key to '*'
Ascii code of '/' is and 47 is a short cut key to '/'
Ascii code of 'Ctrl+M' is 13 and is a short cut key to 'M+'
Ascii code of 'Ctrl+P' is 16 and is a short cut key to 'M-'
Ascii code of 'Ctrl+R' is 18 and is a short cut key to 'MR'
Ascii code of 'Ctrl+C' is 3 and is a short cut key to 'MC'
Ascii code of 'Esc' is 27 and is a short cut key to 'CE'
Ascii code of 'Backspace'is 8 and is a short cut key to 'C'
Ascii code of 'Ctrl+s' is 19 and is a short cut key to '+/-'
Ascii code of 'Enter' is "Not Required" and is a short cut key to '='

NOTE: The control array code is of my school days and is not very efficiently done but I guess the functionality of the program is quite good one.

MartinJose 27Aug2010 08:59

Re: Simple Calculator in Visual Basic 6
 
I remember I used to make a calculator like this when I was having a VB class.

shabbir 27Aug2010 09:23

Re: Simple Calculator in Visual Basic 6
 
Quote:

Originally Posted by MartinJose (Post 72003)
I remember I used to make a calculator like this when I was having a VB class.

Same here. This code is of my school days,

shabbir 29Aug2010 13:27

Re: Simple Calculator in Visual Basic 6
 
It is not possible and you will need to use scripting languages like JavaScript

helloword 30Aug2010 22:14

Re: Simple Calculator in Visual Basic 6
 
oh ,this is i can

shabbir 4Sep2010 12:21

Re: Simple Calculator in Visual Basic 6
 
Nominate this article for Article of the month - Aug 2010 before September 15 2010.

sheppardalbert 13Sep2010 13:08

Re: Simple Calculator in Visual Basic 6
 
Something wrong with that calculator attachment... my WinZip (current copy) says it does not appear to be a valid archive... try downloading it again... I DID... 3 times and it failed to open.

sheppardalbert 13Sep2010 13:11

Re: Simple Calculator in Visual Basic 6
 
Does anyone have the code for a VB.Net 8 calculator... would there be much difference. Can you send the code? The zip file with this code on this page won't open.
Albert

shabbir 13Sep2010 13:12

Re: Simple Calculator in Visual Basic 6
 
Quote:

Originally Posted by sheppardalbert (Post 72707)
Something wrong with that calculator attachment... my WinZip (current copy) says it does not appear to be a valid archive... try downloading it again... I DID... 3 times and it failed to open.

Re-downloaded it once again and it works fine for me. I also tested from a second PC and it works as expected.

sheppardalbert 16Sep2010 23:12

Re: Simple Calculator in Visual Basic 6
 
No... It still does NOT open... "Cannot open file: It does not appear to be a valid archive. If you downloaded this file, try downloading it again.

I tried it before multiple times and again today multiple times; and I tried it on both my desktope and my laptop... the zip does NOT open...

I have the latests version of WinZip Pro and Windows 7 Ultimate... and I don't have problems zipping and opening files except with this one.

sheppardalbert 16Sep2010 23:14

Re: Simple Calculator in Visual Basic 6
 
Can you send me the code to my email address? For the VB.Net calculator...
Albert

shabbir 17Sep2010 08:26

Re: Simple Calculator in Visual Basic 6
 
I have uploaded one more file and this time the file does not contain the exe file but is same as the other one and let me know if this works. If not PM me your email address and I will try sending you in your email.

ratnesh 3Oct2010 11:02

Re: Simple Calculator in Visual Basic 6
 
good program ..

seoguru 6Oct2010 16:17

Re: Simple Calculator in Visual Basic 6
 
thsi is a good information of Calculator

thanks for telling with us

Abdullahi Mohammed 6Nov2010 00:48

Designing a web browser with VB2008
 
How can i create a web browser using Visual Studio 2008

mukeshsoftona 7Nov2011 13:36

Re: Simple Calculator in Visual Basic 6
 
Hi dear.
I done B.sc IT and i used this code for my smaller project report. When i saw this post i really love it. this code is free from errors because it read it.

edwardallene 23Apr2012 06:00

Re: Simple Calculator in Visual Basic 6
 
I also remember this interface when I was in college and our professor told us to make a calculator and when we did it, it ran and it was actually our first program ran in Visual Basic.


All times are GMT +5.5. The time now is 09:26.