public sub command1_Click()
text1.text=sin(val(text1.text))
end sub

Instead of "sin" we can use tan,cos,sqrt,log.

sqr(square)

---

text1.text=(val(text1.text)+val(text1.text))

fact(factorial)

----

dim i as
integer
'dim a as integer//declare 1st of the program
'dim f as flag//declare 1st of the program a=text1.text
f=1
for i=1 to a
f=f*i
next
text1.text=f

-----------------------------------------------------
Nice web site.This site will people who are beginner.

lol i tried to use the inverse functions, but they just dont match the
results i get from a calculator... i mean arcsin(0.5) should be 30, but i
keep getting something like 0.4 or some decimal... and its never over 1
O_o can u tell me whats wrong??? ty~

Reply:

The following code should help you to work out sine and inverse sine.
First, create two buttons - cmdSine and cmdInvSine and then enter the
following code:

Dim pi As
Double

Private Sub Form_Load()
pi = 4 * Atn(1)
End Sub

Private Sub cmdSine_Click()
x = 30

x = x * pi / 180

x = Sin(x)

Debug.Print
x
End Sub

Private Sub cmdInvSine_Click()
x = 0.5

x = Atn(x / Sqr(-x * x + 1))

x = x * 180 / pi

Debug.Print
x
End Sub

Pi is calculated in Form_Load. As mentioned in the MSDN library:

The Sin function takes an angle and returns the ratio of two
sides of a right triangle. The ratio is the length of the side opposite
the angle divided by the length of the hypotenuse.

The result lies in the range -1 to 1.

To convert degrees to radians, multiply degrees by pi/180. To
convert radians to degrees, multiply radians by 180/pi.

Therefore, to get the same result as a calculator for the Sin function,
the number must first be converted into radians by multiplying it by pi
and then dividing by 180.

For inverse sine, the result of the function from the 'Derived Math
Functions' page of the MSDN library for calculating inverse sine must be
multiplied by 180 and then divided by pi.

The Cos and Tan functions should work in the same way and inversely by
using the appropriate function from the 'Derived Math Functions' page of
the MSDN library (see further down this page).

i was realllly hoping that i could use a calculater on yhis website. im in a hurry so i have to do my hw now! i didnt bring my scientific calculater home with me!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!poooo!

Reply:

You need Visual Basic 6.0 to be able to open the calculator projects.

i like the way you give your explanation.for the sake of people like me could you give the code of a standard calculator using visual basic 6.0 in microsoft word as we don't have visual basic in my PC

Reply:

Here is the document. A picture of the Form is included at the
beginning.

pls help us with our final requirement in infotech...
Final Requirement in Info Tech. we have been researching but do not have the idea about the codes.. and imagine we're going to submit ti this week.. here's the
problem..thnx!

1. Create a program that will execute the calculator as shown below. Instead of the basic mathematical operators shown in the calculator below, change them to calculate square root, and conversions to hexadecimal and octal, and the factorial.

2. The program uses arrays, specifically using index for the buttons of numbers, index for the buttons of the square root, hexadecimal and octal, and the factorial.

can u give me an example of a calculator program in visual basic that can solve functions and can evaluate it such as -> x+y+27=0, given: f(x)=3... something like this, and also can solve quadratic equations and also codes on how to create a graph out of an equation... pls. i really nid it ASAP coz the deadline of our project is 2 weeks from now and I still dont know how to create one... THANKS..

will you plz help me with the codings of tangent,squre root,cube root,x cube,x squared and the tan-1...plz rep asap and kindly explain to me what are the meaning of them..and what is the meaning of calcmen?plz help me for my project that will be pass this friday..thanks...

im doing a scientific calculator and a program.... can u pleas e help me in this calculation the formula is X raise to the y for example how can 3 raise 0.387 function? please help me ASAP i have to finished dis progrm thank

the page is very helpful but can u please send a simpler or beginners version for calculator.Not like the one that is given here cos i am not being able to understand what is lastinput= "NUMS" and lastinput ="NEG" y is it used please do explain i am new comer to vb

Reply:

The LastInput variable in the Standard calculator project is used to hold
what the last button pressed was. "NUMS" means a numerical
key was last pressed and "NEG" means the minus key was last
pressed.

hi! i really love math and i got 92 in our math subject by the help of scientific calculater but i have some problem i dont know what is the meaning of In in scientific
calculater.

well...ppl..ill b really glad if u help with the code in designing a scientific calculator..only with..binary complement,xor,+ and - in vb6.0
plz help guys!

From:

Kyanne

Date:

Friday, July 18, 2003 at 03:05:49

Comments:

I am trying to write code for a calculator. I cannot get the add button to add properly.
I looked at the sample program and I am not using a control array (Not doing an array at all).
Help

i really, really need help designing a calculator for my visual basic class. it's a regular four function calculator, but it also has the trig functions and square root. i need help cuz i don't know what the hell i'm doing and this damn thing is due next monday. help!

I need a code for calclautor like the calclautor in windows system .. I mean that I can use the keyboard or I can write 1 + 1 in the result screen then I press Enter >> the result will be 2

hello... this article of urs is very nice... by the way i need some help i have a research project given by out proffesor about the visual basic 6.0 virsion and he wanted us to make a code for a basic calculator could u please help me... thank u so much... the basic calculato would have addition subtraction divission and multiplication functions only i do really apprecial the help thank u