Páginas

lunes, 26 de septiembre de 2011

Calcular el Salario neto de un Trabajador.










Esta aplicación sirve para calcualas el Salario Neto de un trabajador.
A continuacion la programacion:
Private Sub Command1_Click()
Text4.Text = Text2 * Text3
Text5.Text = 0.2 * Text4
Text6.Text = Text4 - Text5
End Sub

Private Sub Command2_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
End Sub




Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Text1.Text = "" Then
MsgBox ("DIGITE UN NOMBRE")
Text1.SetFocus
Else
Text2.SetFocus

End If
End If
End Sub



Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Text1.Text = "" Then
MsgBox ("DIGITE UN NOMBRE")
Text1.SetFocus
Else
Text3.SetFocus

End If
End If
End Sub

Private Sub Text3_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Text1.Text = "" Then
MsgBox ("DIGITE UN NOMBRE")
Text1.SetFocus
Else
Text4.SetFocus

End If
End If
End Sub

Private Sub Text5_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Text1.Text = "" Then
MsgBox ("DIGITE UN NOMBRE")
Text1.SetFocus
Else
Text6.SetFocus

End If
End If
End Sub

Private Sub Text6_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Text1.Text = "" Then
MsgBox ("DIGITE UN NOMBRE")
Text1.SetFocus
Else
Text6.SetFocus

End If
End If
End Sub

No hay comentarios:

Publicar un comentario