Solved

using the keyboard/arrow keys

Posted on 1998-04-19
2
305 Views
Last Modified: 2010-04-06
In Delphi3 I can use the keyboard arrow keys up and down by calling the events "OnKeyDown" or "OnKeyUp" or I can use "OnKeyPressed" with ASCII codes like #13 etc. I do not find a way to use the keyboard left and right arrow keys to control parameters; it seems that in Delhi these keys are not recognized. Can anyone give me a hint?
0
Comment
Question by:casal
2 Comments
 
LVL 5

Accepted Solution

by:
inter earned 100 total points
ID: 1335154
Hi,

In the KeyUp or KeyDown method of the object you interested try the following code fragment:
...
  case Key of
  VK_LEFT : Caption := 'Left';
  VK_UP : Caption := 'Up';
  VK_RIGHT : Caption := 'Right';
  VK_DOWN : Caption := 'Down';
  end;
...
Regards,
Igor
0
 

Author Comment

by:casal
ID: 1335155
Thank you IGOR !
I had an obvious programming error. Thanks to IGOR's suggestion my mistake became visible.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now