Solved

using the keyboard/arrow keys

Posted on 1998-04-19
2
314 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
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…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

737 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