

Requirement: a simple encryption program
easy peasy - using keycodes, or so it should
'single chr to ASCII to chr (automatic)
Private Sub Txt1_keyup(keycode As Integer, shift As Integer)
Label1.Caption = keycode 'encode function
Label2.Caption = Chr(keycode) 'decode
End Sub
entered text converts to ascii fine, but converts back incorrectly- as shown in the tests below:
eg. input chr : input ascii : incorrect label1 ascii : incorrect chr returned
a 97 65 A
A 65 65 A
z 122* 90 Z
Z 90 90 Z
1 49 49 1
in short, A-Z,0-9 are fine, but a-z code/decode to A-Z !!!!!!!
any ideas? surely it cant be that difficult but i am a little stumped as the rest of my little encryption stuff goes fine!- is it just a bad day?



VMT...D
Edited by dpm1did1, 24 May 2006 - 05:50 AM.