Ver Mensaje Individual
  #227 (permalink)  
Antiguo 05/10/2010, 10:36
AntonioMatias
 
Fecha de Ingreso: octubre-2005
Mensajes: 47
Antigüedad: 18 años, 6 meses
Puntos: 0
Información Respuesta: Factura electroncia sat mexico

Private Shared Sub showBytes(ByVal info As String, ByVal data As Byte())

Console.WriteLine("{0} [{1} bytes]", info, data.Length)

For i As Integer = 1 To data.Length Step 1
Console.Write("{0:X2} ", data(i - 1))
If (i Mod 16 = 0) Then
Console.WriteLine()
End If
Next
Console.WriteLine("\n\n")

End Sub

Private Shared Function GetSecPswd(ByVal prompt As String) As SecureString

Dim password As SecureString = New SecureString
Console.ForegroundColor = ConsoleColor.Gray
Console.Write(prompt)
Console.ForegroundColor = ConsoleColor.Magenta

While (True)
Dim cki As ConsoleKeyInfo = Console.ReadKey(True)
If (cki.Key = ConsoleKey.Enter) Then
Console.ForegroundColor = ConsoleColor.Gray
Console.WriteLine()
Return password
ElseIf (cki.Key = ConsoleKey.Backspace) Then
'remove the last asterisk from the screen...
If (password.Length > 0) Then
Console.SetCursorPosition(Console.CursorLeft - 1, Console.CursorTop)
Console.Write(" ")
Console.SetCursorPosition(Console.CursorLeft - 1, Console.CursorTop)
password.RemoveAt(password.Length - 1)
End If
ElseIf (cki.Key = ConsoleKey.Escape) Then
Console.ForegroundColor = ConsoleColor.Gray
Console.WriteLine()
Return password
ElseIf (Char.IsLetterOrDigit(cki.KeyChar) Or Char.IsSymbol(cki.KeyChar)) Then
If (password.Length < 20) Then
password.AppendChar(cki.KeyChar)
Console.Write("*")
Else
Console.Beep()
End If
Else
Console.Beep()
End If
End While

Return password

End Function


End Class

'--------------------------------------------------------------------------------------
Espero que te sirva y puedas encontrar el error.
La solución fue que compile la clase en c# y agrege el DLL a mi proyecto.
'--------------------------------------------------------------------------------------
Saludos...