Ejemplo 1

You might also like

You are on page 1of 3

txtAgente

txtPassword

CmdEnviar
Codigo del botob ACEPTAR

Public Sub CmdEnviar_Click()


On Error GoTo MalEnv
BE = txtBE.Text
If Len(frmLogin.txtAgente) = 0 Then
Beep
stbar.Panels(1).Text = "Error. Clave del agente en blanco. Trate nuevamente"
' Call Pausa(3)
txtAgente.SetFocus
Exit Sub
Else
Age = frmLogin.txtAgente
End If
If Len(frmLogin.) = 0 Then
Beep
stbar.Panels(1).Text = "Error. Contraseña del agente en blanco. Trate nuevamente"
' Call Pausa(3)
txtPassword.SetFocus
Exit Sub
Else
Pas = frmLogin.txtPassword
End If
CmdEnviar.Enabled = False
stbar.Panels(1).Text = "Validando agente, espere por favor..."
frmLogin.MousePointer = 11
' Call Pausa(3)
tcpClient.SendData (RTrim(Age) & "," & RTrim(Pas) & BE)
txtBE.Text = ""
CmdEnviar.Enabled = True
Exit Sub
Private Sub txtAgente_GotFocus()
On Error GoTo error
stbar.Panels(1).Text = "Teclee la clave del agente y presione [ Enter ]"
error:
If Not Err = 0 Then MsgBox (Err.Number & " " & Err.Description & " " & Err.Source & " txtAgente_GotFocus")
End Sub

Private Sub txtPassword_GotFocus()


On Error GoTo error
CmdEnviar.Enabled = True
stbar.Panels(1).Text = "Teclee la contraseña del agente y presione [ Enter ]"
error:
If Not Err = 0 Then MsgBox (Err.Number & " " & Err.Description & " " & Err.Source & " txtPassword_GotFocus")
End Sub

You might also like