calculator and how to make it using vb 6.0
TRANSCRIPT
IT PROJECTTOPIC:-Calculator
CONTENT Introduction What is Calculator. Uses of Calculator History of Calculator 1.Pocket calculator 2.Progammable Calculator 3.Technical improvement 4.Manufactures Current Major manufacturers of Calculator How to make a calculator Using VB
INTRODUCTION An electronic calculator is a small, portable, often
inexpensive electronic device used to perform both basic and complex operations of arithmetic.
The first solid state electronic calculator was created in the 1960s.
Abacus, developed around 2000 BC, and the Mechanical calculator, developed in the 17th century.
WHAT IS CALCULATOR A calculator is a device that performs arithmetic
operations on numbers. The simplest calculators can do only addition,
subtraction, multiplication, and division. More sophisticated calculators can handle exponential
operations, roots, logarithm s, trigonometric functions, and hyperbolic functions. Internally, some calculators actually perform all of these functions by repeated processes of addition.
USES OF CALCULATOR Calculator is used in many ways. it is used in the
field of education and as well as in other field. Calculator is used to do basic arithmetic's and
also to do complex arithmetic's. Calculator is used for calculating big arithmetic
problems in a short period of time. Calculator is used in banks to find the compound
interest, simple interest, and many other things.
HISTORY OF CALCULATOR The first known tool used to aid arithmetic calculations
was the Abacus, devised by Sumerians and Egyptians before 2000 BC.
In 1642, the Renaissance saw the invention of the mechanical calculator by the famous intellectual Blaise Pascal, a device that will eventually perform all four arithmetic operations without relying on human intelligence.
After that many scientist such as G.poleni tried to make a programmable calculator and at last they succeed.
POCKET CALCULATOR By 1970, a calculator could be made using just a few
chips of low power consumption, allowing portable models powered from rechargeable batteries.
The first portable calculators appeared in Japan in 1970, and were soon marketed around the world. In 1971 Pico Electronics and General Instrument also
introduced their first collaboration in ICs, a complete single chip calculator IC for the Monroe Royal Digital III calculator.
The first American-made pocket-sized calculator, the Bowmar 901B in 1971
PROGRAMMABLE CALCULATOR The first desktop programmable calculators were
produced in the mid-1960s by Mathatronics and Casio (AL-1000).
The first programmable pocket calculator was the HP-65, in 1974; it had a capacity of 100 instructions, and could store and retrieve programs with a built-in magnetic card reader.
The first Soviet programmable desktop calculator ISKRA 123, powered by the power grid, was released at the beginning of the 1970s.
Nowadays many companies started manufacturing this type of programmable calculator.
TECHNICAL IMPROVEMENTS Through the 1970s the hand-held electronic calculator
underwent rapid development. The red LED and blue/green vacuum fluorescent displays
consumed a lot of power and the calculators either had a short battery life or were large so that they could take larger, higher capacity batteries.
Busicom introduced the Busicom LE-120A "HANDY" calculator, the first pocket-sized calculator and the first with an LED display.
A more successful series of calculators using a reflective DSM-LCD was launched in 1972 by Sharp Inc with the Sharp EL-805, which was a slim pocket calculator.
MANUFACTURES
These are some of the manufacturers which made a notable contribution to calculator development:-
APF - U.S.A. General Instrument - U.S.A. Aurora – China Hewlett Packard - U.S.A. Bell Punch Company / ANITA – UK Hitachi - Japan. Bowmar - U.S.A. IME - Italy Brunsviga – Germany Litronix - U.S.A. Burroughs - U.S.A. Lloyd's - U.S.A. Busicom - Japan. Marchant - U.S.A. Canon – Japan Monroe - U.S.A. Casio – Japan Odhner - Russia and Sweden. Commodore / CBM - Canada/U.S.A. Rapid Data - Canada. Comptometer / Felt & Tarrant - U.S.A. Rockwell - U.S.A. Compucorp - U.S.A. Sanyo - Japan Digitz – China Sharp - Japan. Elektronika – Lithuania Sinclair - UK. Olivetti - Italy. Toshiba - Japan
CURRENT MAJOR MANUFACTURERS OF CALCULATOR
Aurora Office Equipment Company (China) Canon Electronic Business Machines (HK) Co., Ltd.
(Hong Kong) Casio Computer Co., Ltd. (Japan) Citizen Systems Japan Co., Ltd. (Japan) Hewlett-Packard Development Company, L.P.
(U.S.A.) Sharp Corporation (Japan) Texas Instruments Inc. (U.S.A.)
HOW TO MAKE A CALCULATOR USING VB At first open VB and choose Standard EXE. Now on the form (appeared on the screen) change the back
colour to Black. Now change the caption of the form to calculator. Now add 2 labels. change the caption of the labels to
scientific calculator and caption of the label 2 to Jawahar navodaya vidyalaya.
Now add 2 timer control and change the interval of both the timer to 200 & 500 respectively.
figure of the VB after these process
Now add a text box & change its back colour to yellow. Now add a shape in that form. Change the shape of the shape to rounded rectangle and
the back style to opaque. Now insert a command button and after copy and paste it
11 times. for the first time it will ask you “do you want to make a control array” click on yes.
Now change the caption of the 11 commands to 1,2,3,4,5,6,7,8,9, .&0.
Now add a frame to the form and change his back colour to light purple and border style to none.
fig. of the VB application after these 6 steps.
Now insert another command button in the frame and change it’s caption to “+/-” and back colour to red and style to graphical.
Now insert another command button in the form and change it’s caption to “=”
Now add another command button then copy and paste it,5 times. At first it will ask you “do you want to make a control array” click on yes.
Change the caption of all the command button to +, -, /, *, % respectively and change the back colour of all the command button to red and change the style to graphical.
Now insert another command button and change its caption to C and back colour to aqua.
fig. of the VB application after these 5 steps.
Now add another command button and change its caption to OFF and back colour to aqua.
Now add another command button and change its caption to ON and back colour to aqua.
Now add another command button then copy and paste it,9 times. Now change its caption to sin,cos,tan,sqrt, abs, md, log and atn.
Now add another command button and change its caption to MEMR.
Now add another command button and change its caption to MEMW.
fig. of the VB application after these 5 steps.
Now define the variable as follow:- Dim op As String Option Explicit Dim i As Integer Dim exp1 As Double Dim exp2 As Double Dim Result As Double Dim count1 As Integer Dim scitype As String Private X As Double Dim mem As Variant Now add the code in that application as follow:- Private Sub Command1_Click(Index As Integer) If count1 = 0 Then Text1.Text = " " MsgBox ("Calculator is not on") End If
If count1 = 1 ThenText1.Text = " "count1 = count1 + 1End IfIf count1 > 1 ThenText1.Text = Text1.Text & Command1(Index).CaptionEnd IfEnd Sub-------------------------------------------------------------------------------------------------------
--Private Sub Command10_Click() Text1.Text = memEnd Sub-------------------------------------------------------------------------------------------------------
--Private Sub Command2_Click()Text1.Text = -Val(Text1.Text)End Sub-------------------------------------------------------------------------------------------------------
--
Private Sub Command3_Click()If count1 > 0 Thenexp2 = Val(Text1.Text)Select Case (op)Case "+" Result = exp1 + exp2 Text1.Text = Result count1 = 0Case "-" Result = exp1 - exp2 Text1.Text = Result count1 = 0Case “*" Result = exp1 * exp2 Text1.Text = Result count1 = 0
Case " /" Result = exp1 / exp2 Text1.Text = Result count1 = 0Case "%" Result = (exp1 / 100) * exp2 Text1.Text = Result count1 = 0End SelectEnd IfEnd Sub---------------------------------------------------------------------------------------------------------------Private Sub Command4_Click(Index As Integer)Result = exp1exp1 = Result + Val(Text1.Text)Text1.Text = " "op = Command4(Index).CaptionEnd Sub----------------------------------------------------------------------------------------------------------------
Private Sub Command5_Click()Result = 0exp1 = 0exp2 = 0Text1.Text = " "count1 = 1End Sub---------------------------------------------------------------------------------------------------------Private Sub Command6_Click()count1 = 0Text1.Text = ""End Sub---------------------------------------------------------------------------------------------------------Private Sub Command7_Click()Result = 0exp1 = 0exp2 = 0count1 = 1Text1.Text = "0"End Sub----------------------------------------------------------------------------------------------------------------
Private Sub UpdateLog() Trim (Form1.Text1.Text) End Sub---------------------------------------------------------------------------------------------------------Private Sub Command8_Click(Index As Integer)scitype = Command8(Index).CaptionSelect Case (scitype)Case "sin" Text1.Text = (Text1.Text * 3.14) / 180 Text1.Text = Math.Sin(Val(Text1.Text)) count1 = 0Case "cos" Text1.Text = (Text1.Text * 3.14) / 180 Text1.Text = Math.Cos(Val(Text1.Text)) count1 = 0Case "tan" Text1.Text = (Text1.Text * 3.14) / 180 Text1.Text = Math.Tan(Val(Text1.Text)) count1 = 0----------------------------------------------------------------------------------------------------------------
Case "sqrt" Text1.Text = Math.Sqr(Val(Text1.Text)) count1 = 0Case "abs" Text1.Text = Math.Abs(Val(Text1.Text)) count1 = 0Case "rnd" Text1.Text = Math.Rnd(Val(Text1.Text)) count1 = 0Case "log" Text1.Text = Math.Log(Val(Text1.Text)) count1 = 0Case "Atn" Text1.Text = Math.Log(Val(Text1.Text)) count1 = 0End SelectEnd Sub----------------------------------------------------------------------------------------------------------------Private Sub Command9_Click()mem = Text1.TextEnd Sub----------------------------------------------------------------------------------------------------------------
Private Sub Form_Load()
End Sub--------------------------------------------------------------------------------------------------
--------Private Sub Timer1_Timer()Label1.BackColor = RGB(256 * Rnd, 256 * Rnd, 256 * Rnd)End Sub--------------------------------------------------------------------------------------------------
--------Private Sub Timer2_Timer()Label2.BackColor = RGB(256 * Rnd, 256 * Rnd, 256 * Rnd)End Sub--------------------------------------------------------------------------------------------------
--------
OUTPUT SCREEN
CONCLUSION
ANY QUERIES
REFERENCE https://www.google.co.in/ http://www.bing.com/ http://in.yahoo.com/ http:// www.wikipedia.org http://www.slideshare.net http://wiki.answer.com http://www.vbtutor.net