Labatorios de computacion

Solo disponible en BuenasTareas
  • Páginas : 3 (638 palabras )
  • Descarga(s) : 0
  • Publicado : 13 de junio de 2011
Leer documento completo
Vista previa del texto
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
txt_RESULTADO = Division
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
txt_RESULTADO = Multiplicación
End Sub

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

Private Sub Cmd_suma_Click()
Dim N1 As Integer
Dim N2 As Integer
N1 =txt_N1
N2 = txt_N2
Suma = N1 + N2
txt_RESULTADO = Suma
End Sub
Private Sub Cmd_limpiar_Click()
txt_N1 = ""
txt_N2 = ""
txt_RESULTADO = ""
End Sub
Private Sub cmd_Salir_Click()
End
End SubCODIGO FUENTE:
Private Sub Cmd_calcular_Click()
Dim n As Integer
Dim r As Integer
Dim resultado As Integer
r = Text2
n = Text1
resultado = n * r
Text3 = resultado
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...
tracking img