Blind Input

Please support our Pascal and Delphi advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Apr 2009
Posts: 5
Reputation: harish92 is an unknown quantity at this point 
Solved Threads: 0
harish92 harish92 is offline Offline
Newbie Poster

Blind Input

 
0
  #1
Apr 7th, 2009
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.
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 450
Reputation: FlamingClaw will become famous soon enough FlamingClaw will become famous soon enough 
Solved Threads: 108
FlamingClaw's Avatar
FlamingClaw FlamingClaw is offline Offline
Posting Pro in Training

Re: Blind Input

 
0
  #2
Apr 7th, 2009
example:

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

  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.
Be a good part of the community.Don't be ungrateful.
If you ask something on the forum and you got the right answer then mark as solved!
If my opinion helped to you a lot then sometimes give reputation point to me.
I'm just a pascal programmer from Hungary.
Farewell...
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 68
Reputation: jsosnowski is an unknown quantity at this point 
Solved Threads: 11
jsosnowski's Avatar
jsosnowski jsosnowski is offline Offline
Junior Poster in Training

Re: Blind Input

 
0
  #3
Apr 7th, 2009
FlamingClaw's example is for using an editbox in a Form application. Are you creating a form or are you doing a consule application?
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 5
Reputation: harish92 is an unknown quantity at this point 
Solved Threads: 0
harish92 harish92 is offline Offline
Newbie Poster

Re: Blind Input

 
0
  #4
Apr 7th, 2009
Originally Posted by jsosnowski View Post
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
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 11
Reputation: glindhot is an unknown quantity at this point 
Solved Threads: 1
glindhot glindhot is offline Offline
Newbie Poster

Re: Blind Input

 
0
  #5
Apr 8th, 2009
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.
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 450
Reputation: FlamingClaw will become famous soon enough FlamingClaw will become famous soon enough 
Solved Threads: 108
FlamingClaw's Avatar
FlamingClaw FlamingClaw is offline Offline
Posting Pro in Training

Re: Blind Input

 
0
  #6
Apr 11th, 2009
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.
Be a good part of the community.Don't be ungrateful.
If you ask something on the forum and you got the right answer then mark as solved!
If my opinion helped to you a lot then sometimes give reputation point to me.
I'm just a pascal programmer from Hungary.
Farewell...
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 450
Reputation: FlamingClaw will become famous soon enough FlamingClaw will become famous soon enough 
Solved Threads: 108
FlamingClaw's Avatar
FlamingClaw FlamingClaw is offline Offline
Posting Pro in Training

Re: Blind Input

 
0
  #7
Apr 14th, 2009
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.
Be a good part of the community.Don't be ungrateful.
If you ask something on the forum and you got the right answer then mark as solved!
If my opinion helped to you a lot then sometimes give reputation point to me.
I'm just a pascal programmer from Hungary.
Farewell...
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC