---CaLcUlAdOrA--- Vb --- :]

Publicado en por MaGkI

CALCULADORA CON LAS OPERACIONES BASICAS, FUNCIONES SENO, COSENO, TANGENTE, PI Y FACTORIAL ETC...

CALCULATOR.jpg

Public

 

Class Form1

 

Dim n1, n2 As Double

 

Dim opera As Integer

 

Dim resp As Double

 

Dim den As Double

 

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

TextBox1.Text = TextBox1.Text + Str(1)

 

End Sub

 

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

TextBox1.Text = TextBox1.Text + Str(2)

 

End Sub

 

Private Sub Button17_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button17.Click

 

End

 

End Sub

 

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click

TextBox1.Text = TextBox1.Text + Str(3)

 

End Sub

 

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click

TextBox1.Text = TextBox1.Text + Str(4)

 

End Sub

 

Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click

TextBox1.Text = TextBox1.Text + Str(5)

 

End Sub

 

Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click

TextBox1.Text = TextBox1.Text + Str(6)

 

End Sub

 

Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click

TextBox1.Text = TextBox1.Text + Str(7)

 

End Sub

 

Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click

TextBox1.Text = TextBox1.Text + Str(8)

 

End Sub

 

Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click

TextBox1.Text = TextBox1.Text + Str(9)

 

End Sub

 

Private Sub Button10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button10.Click

TextBox1.Text = TextBox1.Text + Str(0)

 

End Sub

 

Private Sub Button11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button11.Click

n1 = Val(TextBox1.Text)

opera = 3

TextBox1.Text =

" "

 

End Sub

 

Private Sub Button12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button12.Click

n1 = Val(TextBox1.Text)

opera = 4

TextBox1.Text =

" "

 

End Sub

 

Private Sub Button13_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button13.Click

n1 = Val(TextBox1.Text)

opera = 1

TextBox1.Text =

" "

 

End Sub

 

Private Sub Button14_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button14.Click

n1 = Val(TextBox1.Text)

opera = 2

TextBox1.Text =

" "

 

End Sub

 

Private Sub Button15_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button15.Click

n2 = Val(TextBox1.Text)

 

If (opera = 1) Then

resp = n1 * n2

TextBox1.Text = resp

 

End If

 

If (opera = 2) Then

resp = n1 / n2

TextBox1.Text = resp

 

End If

 

If (opera = 3) Then

resp = n1 + n2

TextBox1.Text = resp

 

End If

 

If (opera = 4) Then

resp = n1 - n2

TextBox1.Text = resp

 

End If

 

If (opera = 5) Then

resp = n1 ^ n2

TextBox1.Text = resp

 

End If

 

End Sub

 

Private Sub Button16_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button16.Click

TextBox1.Text =

" "

 

End Sub

 

Private Sub Button22_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button22.Click

n1 = Val(TextBox1.Text)

TextBox1.Text = n1

Mod 2

 

End Sub

 

Private Sub Button21_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button21.Click

 

Dim raiz As Double

n1 = Val(TextBox1.Text)

raiz = Math.Sqrt(n1)

TextBox1.Text = raiz

 

End Sub

 

Private Sub Button20_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button20.Click

n1 = Val(TextBox1.Text)

TextBox1.Text = 1 / n1

 

End Sub

 

Private Sub Button19_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button19.Click

n1 = Val(TextBox1.Text)

TextBox1.Text = n1 ^ 2

 

End Sub

 

Private Sub Button18_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button18.Click

n1 = Val(TextBox1.Text)

TextBox1.Text = n1 ^ 3

 

End Sub

 

Private Sub Button27_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button27.Click

n1 = Val(TextBox1.Text)

TextBox1.Text = 0 - n1

 

End Sub

 

Private Sub Button28_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button28.Click

n1 = Val(TextBox1.Text)

opera = 5

TextBox1.Text =

" "

 

End Sub

 

 

Private Sub Button24_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button24.Click

 

Dim cos As Double

n1 = Val(TextBox1.Text)

cos = Math.Cos(n1)

TextBox1.Text = cos

 

 

End Sub

 

Private Sub Button25_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button25.Click

 

Dim sin As Double

n1 = Val(TextBox1.Text)

den = 180 / n1

sin = Math.Sin(Math.PI / den)

TextBox1.Text = sin

 

End Sub

 

Private Sub Button26_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button26.Click

 

Dim tan As Double

n1 = Val(TextBox1.Text)

den = 180 / n1

tan = Math.Tan(Math.PI / den)

TextBox1.Text = tan

 

End Sub

 

Private Sub Button29_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button29.Click

 

Dim pi As Double

n1 = Val(TextBox1.Text)

pi = Math.PI

TextBox1.Text = pi

 

End Sub

 

Private Sub Button30_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button30.Click

 

Dim fac As Double

n1 = Val(TextBox1.Text)

fac = 1

 

While (n1 <> 0)

fac = fac * n1

n1 = n1 - 1

TextBox1.Text = fac

 

End While

 

End Sub

End

 

Class


Comentar este post

jorge 12/27/2010 19:26


apues yo pensaba qeu era solo c++ tamebisn tiens visual


Descargar 06/27/2010 16:29


No me funciona muy bien que digamos, es mas, me da errores de compilacion y no se como arreglarlo rapido...


Handbags 04/10/2010 09:30


JZP20100203 From 1920 onwards, Gucci of Italy's luxury fashion brand is known. All along, she was leading the popular trend of wearing high-quality, regardless of the price of her addition of
expensive, Gucci Handbags Sale has always been far ahead of. No wonder Gucci is the world's best-selling Italian brand! You see, Madonna has often appeared carrying a Gucci Handbag, Kate Winslet,
Cameron Diaz is also preferred Gucci.In 2010, the Gucci creative director, Frida Giannini,released a new Designer Handbag of it,do please look forward to.


▄▄German__77▄▄ 09/24/2009 18:24


HOLA TE QUERIA DECIR SI QUERES ESTAR EN MI COMUNIDAD, EN ESTA COMUNIDAD ES PARA LOS Q LES GUSTA PUBLICAR TODO TIPO DE COSAS MENOS PORNOGRAFÍA. Y LA META PRINCIPAL ES
DIVERTIRSE,ENTRETENER,PROMOCIONAR SUS PROPIOS ARTICULOS,ECT.
SI TU BLOG ES PARECIDO UNETE Y SI ES DE ENTRETENIMIENTO PERO TU NO PUBLICA TODO TIPO DE COSAS NO IMPORTA DA CLICK EN ESTE LINK:
http://es.over-blog.com/com-1109371377/Entertainment_For_The_society.html