OK I'd like to capture each individual character sent to an edit textbox.
The application (I tried this about 6-8 months ago), can only take the following characters:
A-F
0-9 'Hex characters
So I look for those individually and everything works fine...
But if the user puts say a K in the textbox I want to pull it out before it gets painted, how do I do that?
Thanks!
Scott Turchin
[This message has been edited by Scott Turchin (edited January 21, 2000).]
The application (I tried this about 6-8 months ago), can only take the following characters:
A-F
0-9 'Hex characters
So I look for those individually and everything works fine...
But if the user puts say a K in the textbox I want to pull it out before it gets painted, how do I do that?
Thanks!

Code:
Static St As String Local Y As long Local X As long Case %WM_COMMAND Select Case LoWrd(wParam) Case %IDTEXT1 Select Case CbCtlMsg Case %WM_CHAR Case %WM_KEYDOWN Case %EN_CHANGE 'After painted to window Case %EN_UPDATE 'Before painted to window Control Get Text hDlg, %IDTEXT1 To NewChar NewChar = Right$(NewChar,1)'Grab the new character 'Test to see if it fits between ascii range Y = Asc(NewChar) If ((Y => 48) And (Y <= 57)) Or ((Y => 65) And (Y <= 70)) Then St = St + Chr$(Y) If Len(St) = 12 Then Control Enable hDlg, %IDSWAP Else Control Disable hDlg, %IDSWAP End Select Case %IDSWAP 'Swap button Control Set Text hDlg, %IDTEXT2, SwapAddress(St) 'USE EN_UPPERCASE when creating Function = 0 Exit Function
[This message has been edited by Scott Turchin (edited January 21, 2000).]
Comment