Documentos de Académico
Documentos de Profesional
Documentos de Cultura
09 Anexo II PDF
09 Anexo II PDF
ANEXO II
End Sub
End Sub
txtRecepcionAsc.SelStart = Len(txtRecepcionAsc.Text)
txtRecepcionHex.SelStart = Len(txtRecepcionHex.Text)
ElseIf cmdAsciiHex.Caption = "Hex" Then 'Para ver la ventana Hex.
cmdAsciiHex.Caption = "Ascii"
txtRecepcionAsc.Visible = False 'Ocultamos la ventana Ascii.
txtRecepcionHex.Top = 240 'Establecemos el tamaño y posición
'de la ventana Hex.
txtRecepcionHex.Left = 120
txtRecepcionHex.Height = 2535
txtRecepcionHex.Width = 6015
txtRecepcionHex.Visible = True 'Hacemos visible la ventana
'Hex.
txtRecepcionHex.Text = textoHex 'Representamos los caracteres
'Hex.
txtRecepcionHex.SelStart = Len(txtRecepcionHex.Text)
Else
cmdAsciiHex.Caption = "Ascii/Hex" 'Para ver la ventana Ascii.
txtRecepcionHex.Visible = False 'Ocultamos la ventana Hex.
txtRecepcionAsc.Height = 2535 'Ajustamos el tamaño de la
'ventana Ascii.
txtRecepcionAsc.Width = 6015
txtRecepcionAsc.Visible = True 'Hacemos visible la ventana
'Ascii.
txtRecepcionHex.Top = 1560 'Ajustamos la posición de la
'ventana Hex.
txtRecepcionHex.Left = 120
txtRecepcionHex.Height = 1095
txtRecepcionHex.Width = 7095
txtRecepcionAsc.Text = textoAsc 'Representamos los caracteres
'Ascii.
txtRecepcionAsc.SelStart = Len(txtRecepcionAsc.Text)
End If
End Sub
textoAsc = ""
textoHex = ""
textoAsc_Cr = ""
textoHex_Cr = ""
txtRecepcionAsc.Text = ""
txtRecepcionHex.Text = ""
num_car = 0
num_car_Asc = 0
End Sub
cboEnvioAsc.Text = ""
txtEnvioHex.Text = ""
End Sub
End Sub
End Sub
End Sub
End Sub
Dim i As Integer
Dim cad_rx As String 'cadena recibida por el puerto serie.
Dim car_rx_Asc As String 'Representación Ascii de un carácter
'de la cadena recibida.
Dim car_rx_Hex As String 'Representación hexadecimal de un
'carácter de la cadena recibida.
If comControl.CommEvent = comEvReceive Then 'Se ha recibido una
'cadena.
cad_rx = comControl.Input
For i = 1 To Len(cad_rx)
If num_car_Asc = 53 Then
textoAsc = textoAsc & vbCrLf
num_car_Asc = 0
End If
If num_car = 32 Then
textoAsc_Cr = textoAsc_Cr & vbCrLf
textoHex_Cr = textoHex_Cr & vbCrLf
num_car = 0
End If
Next i
txtRecepcionAsc.SelStart = Len(txtRecepcionAsc.Text)
txtRecepcionHex.SelStart = Len(txtRecepcionHex.Text)
End If
End Sub
num_car = 0
num_car_Asc = 0
textoAsc = ""
textoHex = ""
txtRecepcionAsc.Height = 2535
txtRecepcionAsc.Width = 6015
cmdRTS.Enabled = False
cmdDTR.Enabled = False
cmdEnviar.Enabled = False
End Sub
txtEnvioHex.Text = UCase(txtEnvioHex.Text)
txtEnvioHex.SelStart = Len(txtEnvioHex.Text)
End Sub
End Function
End Function
If frmPuertoSerie.chkCR.Value = 0 Then
If frmPuertoSerie.chkLF.Value = 0 Then
car_CRLF = ""
Else
car_CRLF = Chr(10)
End If
Else
If frmPuertoSerie.chkLF.Value = 0 Then
car_CRLF = Chr(13)
Else
car_CRLF = Chr(13) & Chr(10)
End If
End If
End Function