You mean something like this:
Private Function Pwd2Dec(ByVal Pwd As String) As String
Dim MyPwd() As Char
Dim DecPwd As New System.Text.StringBuilder
MyPwd = Pwd.ToCharArray()
For i As Integer = 0 To MyPwd.GetUpperBound(0)
DecPwd.Append(Asc(MyPwd(i)).ToString & " ")
Next
Return DecPwd.ToString
End Function
Private Function Dec2Pwd(ByVal DecPwd As String) As String
Dim MyDec() As String = Split(DecPwd, " ")
Dim Pwd As New System.Text.StringBuilder
For i As Integer = 0 To MyDec.GetUpperBound(0)
'used cint(val(..)) instead of cint because it won't give a
type mismatch when the string isn't numeric
Pwd.Append(Chr(CInt(Val(MyDec(i)))))
Next
Return Pwd.ToString
End Function
xla76 wrote:
Hi all,
I am trying to follow some instructions for setting a password for VNC.
unfortunately I get stuck at the first hurdle:
''DecimalPassword = your password converted to decimal, separated by
spaces. ie "255 255 255"'
How do I do that? I tried double.parse with no luck.
Thanks
Pete