# Labatorios de computacion

Páginas: 3 (638 palabras) Publicado: 13 de junio de 2011
CODIGO FUENTE:

Private Sub Cmd_division_Click()
Dim N1 As Integer
Dim N2 As Integer
N1 = txt_N1
N2 = txt_N2
If (N2 > 0) Then
Division = N1 / N2
End If
End SubPrivate Sub Cmd_multiplicacion_Click()
Dim N1 As Integer
Dim N2 As Integer
N1 = txt_N1
N2 = txt_N2
Multiplicación = N1 * N2
End Sub

Private SubCmd_resta_Click()
Dim N1 As Integer
Dim N2 As Integer
N1 = txt_N1
N2 = txt_N2
Resta = N1 - N2
End Sub

Private Sub Cmd_suma_Click()
Dim N1 As Integer
Dim N2 As Integer
N1 =txt_N1
N2 = txt_N2
Suma = N1 + N2
End Sub
Private Sub Cmd_limpiar_Click()
txt_N1 = ""
txt_N2 = ""
End Sub
Private Sub cmd_Salir_Click()
End
End SubCODIGO FUENTE:
Private Sub Cmd_calcular_Click()
Dim n As Integer
Dim r As Integer
r = Text2
n = Text1
End Sub

Private SubCmd_nuevo_Click()
Text2 = ""
Text1 = ""
Text3 = ""
End Sub

Private Sub Cmd_salir_Click()
End
End Sub

CODIGO FUENTE:
Dim a As Integer
Dim b As Integer
Dim c As Integer
Dim r As Integer
Dim x1As Integer
Dim x2 As Integer

Private Sub Cmd_calcular_Click()
a = Val(Text1.Text)
b = Val(Text2.Text)
c = Val(Text3.Text)
r = b * b - 4 * a * c
If r < 0 Then
MsgBox ("No válido a, b, c")Else
ra = Sqr(r)
x1 = (-b + ra) / (2 * a)
x2 = (-b - ra) / (2 * a)
Text4.Text = x1
Text5.Text = x2
End If
End Sub

Private Sub Cmd_limpiar_Click()
Text1 = ""
Text2 = ""
Text3 = ""
Text4= ""
Text5 = ""
End Sub

Private Sub Cmd_salir_Click()
End
End Sub

CODIGO FUENTE:
Dim num As Integer

Private Sub cmd_aceptar_Click()
num = txt_codigo.Text
If num > 7 Then
x =MsgBox("Introduzca un Numero entre 1 y 7", vbOKOnly + vbCritical, "Error de Dato")
Else
f = txt_codigo.Text
Select Case f
Case Is = 1
x = MsgBox("DOMINGO", vbInformation + vbOKOnly, "Resultado de la...

Regístrate para leer el documento completo.