Solved

using the keyboard/arrow keys

Posted on 1998-04-19
2
303 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

762 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

18 Experts available now in Live!

Get 1:1 Help Now