Programming Tools
Problem for Programming Tools
Generic problem for all Programming Tools

Keyboard functions in Delphi




By Peppercat on Sep 05, 2007

" "
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.

Solution #1

posted on Oct 01, 2007
Not Rated)

Delphiuser

Rank: Master 
Rating: 94%, 18 votes
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
Was this helpful?
Yes
No

Popular Solutions for Programming Tools


Questions and Unsolved Problems for Programming Tools


Answer
where can I get a customer tool disk for a sharp xa-a41s??

Answer
how to creat a system in visual basic like as electronic book system and give example and code... (More)

Answer
I can't get my easy share program to down load picture's from my p850

Answer
CD per fare l'istallazione per Camedia digitale Camara


Didn't find what you were looking for?

Describe your Programming Tools problem:

Select a Category:







Ask our Experts

 

Solve Your Problem Now!
Chat Live with an Expert
Chat Now
Top Programming Tool Experts



Top Computer & Laptop Repairmen

(952) 890-7770
Zkarlo.com provides discount and used laptop parts...
Zkarlo.com

(513) 874-3306
We fix and repair laptop motherboard no video, no...
LaptopOnCall Inc.


       
Solve Your Problem Now!
Chat Live with an Expert
Chat Now

Insert Link
Insert Image
Insert You-Tube clip
Insert List
Insert List
Spell Check

What is this?



Select