Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Private Sub Command1_Click()

Dim A As Integer
A = Val(Text1)
MsgBox ("SU TEMPERATURA ES:" & Format(A) & "°C")
If Option1 = True Then
If A > 50 Then
Text2 = Text2 & "CALIENTE " & vbCrLf
Image3.Visible = True
Image2.Visible = False
Image1.Visible = False
ElseIf A < 50 And A > 20 Then
Text2 = Text2 & "TIBIO " & vbCrLf
Image2.Visible = True
Image1.Visible = False
Image3.Visible = False
Else
Text2 = Text2 & " FRIA " & vbCrLf
Image1.Visible = True
Image2.Visible = False
Image3.Visible = False
End If
Else: Option2 = True
If A > 40 Then
Text2 = Text2 & "CALIENTE" & vbCrLf
Image3.Visible = True
Image2.Visible = False
Image1.Visible = False
ElseIf A < 40 And A > 10 Then
Text2 = Text2 & "TIBIA " & vbCrLf
Image2.Visible = True
Image1.Visible = False
Image3.Visible = False
Else
Text2 = Text2 & "FRIA" & vbCrLf
Image1.Visible = True
Image2.Visible = False
Image3.Visible = False
End If

End If
End Sub

Private Sub Command2_Click()


Text1 = ""
Text2 = ""
Image1.Visible = False
Image2.Visible = False
Image3.Visible = False
Text1.SetFocus
End Sub
Private Sub Command3_Click()
Dim C
C = MsgBox("DESEA SALIR? ", vbYesNo + vbCritical, "SALIDA ")
If C = vbYes Then
End
Else
End If
End Sub
Private Sub Command4_Click()
Printer.FontName = "arial"
Printer.FontSize = 14
Printer.FontBold = True
Printer.FontItalic = True
Printer.Print Spc(5); "HOLA IMPRESORA "
Printer.Print Spc(5); (Text2)
Printer.FontItalic = False
Printer.Print "SU TEMPERATURA :" + (Text1)
Printer.Print "RESPUESTA :" + (Text2)
Printer.ForeColor = vbBlue
Printer.Print
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!"
Printer.ForeColor = vbRed
Printer.Print "FIN DE LA LINEA "
Printer.EndDoc
End Sub
Private Sub Form_Load()
Dim R
R = MsgBox("DESEA ENTRAR ?", vbYesNo + vbQuestion, "ENTRADA ")
If R = vbNo Then
End
Else
End If
Form1.Caption = "¿FRIA,TIBIA O CALIENTE ?"
MsgBox "BIENVENIDO " & vbCrLf & "CIRONEL MONSALVE VALDERRAMA 1981103 " & vbCrLf &
"VALENTINA BAUTISTA SANTOS 1981119 " & vbCrLf & "LAURA NATALI BERMON CALDERON
1181860"
End Sub
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 8 Then
Command2_Click
End If
If KeyCode = 27 Then
Command3_Click
End If
End Sub
Private Sub Text2_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 27 Then
MsgBox "BIENVENIDO " & vbCrLf & "CIRONEL MONSALVE VALDERRAMA 1981103 " & vbCrLf &
"VALENTINA BAUTISTA SANTOS 1981119 " & vbCrLf & "LAURA NATALI BERMON CALDERON
1181860"
End If
End Sub

You might also like