943,699 Members | Top Members by Rank

Ad:
Apr 7th, 2009
0

Blind Input

Expand Post »
In a game of Hangman, a setter of the word/phrase is required to enter a phrase. However, I was wondering if there was any way to input data blindly, so that the guesser cannot see the phrase getting typed in. An example of its use would be passwords being entered.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
harish92 is offline Offline
5 posts
since Apr 2009
Apr 7th, 2009
0

Re: Blind Input

example:

edit box ->Object Inspector->Properties->PasswordChar

delphi Syntax (Toggle Plain Text)
  1. Edit1.PasswordChar:=#42; {*}
  2. {or}
  3. Edit1.PasswordChar:=#35; {#}
  4. {or}
  5. Edit1.PasswordChar:='*';
  6. {or}
  7. Edit1.PasswordChar:='x';
  8. {
  9. Use the PasswordChar property to create an edit control that displays a special character in place of any entered text. If PasswordChar is set to the null character (ANSI character zero), the edit control displays its text normally. If PasswordChar is any other character, the edit control displays PasswordChar in place of each character typed. PasswordChar affects the appearance of the edit control only. The value of the Text property reflects the actual characters that are typed.
  10.  
  11. }
Last edited by FlamingClaw; Apr 7th, 2009 at 9:55 am.
Reputation Points: 132
Solved Threads: 138
Posting Pro
FlamingClaw is offline Offline
559 posts
since Feb 2009
Apr 7th, 2009
0

Re: Blind Input

FlamingClaw's example is for using an editbox in a Form application. Are you creating a form or are you doing a consule application?
Reputation Points: 11
Solved Threads: 11
Junior Poster in Training
jsosnowski is offline Offline
68 posts
since Nov 2007
Apr 7th, 2009
0

Re: Blind Input

Click to Expand / Collapse  Quote originally posted by jsosnowski ...
FlamingClaw's example is for using an editbox in a Form application. Are you creating a form or are you doing a consule application?
console application
Reputation Points: 10
Solved Threads: 0
Newbie Poster
harish92 is offline Offline
5 posts
since Apr 2009
Apr 8th, 2009
0

Re: Blind Input

Pascal and Delphi Syntax (Toggle Plain Text)
  1. program echostar;
  2. uses Crt;
  3. const
  4. EnterKey = ord(13);
  5. var
  6. Entry :char;
  7. SecretMessage :string;
  8. begin
  9. ClrScr;
  10. SecretMessage := '';
  11. Entry := ' ';
  12. writeln('Enter your secret word or message:');
  13. repeat
  14. begin
  15. Entry := (Readkey);
  16. write('*');
  17. if ord(Entry) <> EnterKey then
  18. SecretMessage := SecretMessage + Entry;
  19. end;
  20. until ord(Entry) = EnterKey;
  21. {display the entry to show it works, then remove}
  22. writeln;
  23. writeln('Secret message is ', SecretMessage);
  24. end.
Reputation Points: 10
Solved Threads: 1
Newbie Poster
glindhot is offline Offline
14 posts
since Feb 2008
Apr 11th, 2009
0

Re: Blind Input

Hi glindhot
I know that my opinion is means nothing,but I like your code.Nice work!
Last edited by FlamingClaw; Apr 11th, 2009 at 5:35 am.
Reputation Points: 132
Solved Threads: 138
Posting Pro
FlamingClaw is offline Offline
559 posts
since Feb 2009
Apr 14th, 2009
0

Re: Blind Input

I think that glindhot is solved your problem.Only one thing that you have to to do is download a unit .There are people who rewrote the Turbo Pascal's Crt unit for Delphi.All procedure and function can be found,that working with delphi,such as 'ReadKey','KeyPressed',ClrScr....etc
So try the 'google'...
Last edited by FlamingClaw; Apr 14th, 2009 at 12:39 pm.
Reputation Points: 132
Solved Threads: 138
Posting Pro
FlamingClaw is offline Offline
559 posts
since Feb 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Pascal and Delphi Forum Timeline: StringGrid doesn't redraw correctly
Next Thread in Pascal and Delphi Forum Timeline: How can I list all the contestants?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC