Computer Science Canada how to enter a pin number |
Author: | dairyman_crick [ Fri May 28, 2004 3:46 pm ] |
Post subject: | how to enter a pin number |
hi, I'm currently making a security program which needs a pin number. However, the pin number has to be appear as "*****". How can I enter numbers yet make them look like symbols? Any suggestion is appreciated. Thanks. |
Author: | guruguru [ Fri May 28, 2004 3:51 pm ] | ||
Post subject: | |||
If you're using GUI it's very simple. Use GUI.SetEchoChar (yourWidget, "*"). This auotmatically puts in stars instead of characters. Otherwise... This gets harder. Basically, when a key is presed, you manually put a "*", and add the pressed key to a declared string.
You can change the loop to a for loop to limit the number of letter inputted. At the end of the loop, code is the password the user has inputted. |
Author: | Cervantes [ Fri May 28, 2004 6:42 pm ] | ||
Post subject: | |||
you'll notice those that pressing enter counts as a part of your pin number. to fix this: insert
just after "getch (ch)" and just before "put "*" .." |
Author: | xmdxtreme [ Fri May 28, 2004 8:19 pm ] | ||
Post subject: | |||
Heres the code that i made for my project and im using now this is good cause backspace works too.
|
Author: | dairyman_crick [ Sun May 30, 2004 1:36 pm ] |
Post subject: | |
It worked!!! ![]() |
Author: | Andy [ Tue Jun 01, 2004 8:25 pm ] |
Post subject: | |
you should do a search first before posting for help... alot of common procedures such as this are in the turing source codes.. i wrote a masking program long time ago and submitted it |