Question about Computers & Internet
I wrote a program in Borland Delphi. Hangman. I would like to know how I can make it possible for the user to click on the "A" key on the keyboard and let the program choose that image and fill in the letter the user choose without the user having to click on the image.
In Delphi, the form, and many controls have events for key presses OnKeyDown, OnKeyPress, OnKeyUp, etc. the Key is passed in as a Word value, but when cast with the ?Chr(Key)? function it will be come a Character from the keyboard. As for writing the text out to the screen, TextRect(Rect: TRect; X, Y: Integer; const Text: string); will let you write the text anywhere on your canvas that you want to and that should get you started. Good Luck
Posted on Oct 01, 2007
Tips for a great answer:
Mar 10, 2011 | Borland DBASE 5.0 Upgrade Version Academic...
Nov 02, 2010 | Computers & Internet
May 22, 2010 | Borland Delphi® 2006 Enterprise Upgrade...
Mar 03, 2010 | Borland Delphi 2005 Professional
Jan 27, 2010 | Borland Delphi Studio Enterprise 7 Upgrade...
Jan 06, 2010 | HP Pavilion M9040N Elite Desktop PC
Dec 06, 2009 | Microsoft Windows XP Professional
Nov 07, 2009 | Borland DELPHI 7 ENT SA (HDE0000WWSA000)
Sep 09, 2009 | Computers & Internet
Sep 02, 2009 | Borland STARTEAM 5.2 NAMED MAINT...
Usually answered in minutes!