Solved

CURSOR

Posted on 1998-06-11
2
256 Views
Last Modified: 2010-04-04
pLEASE COULD ANYONE HELP? I need a program in Delphi that will allow you to use the cursor keys to move a pointer around a window along with the home key and the return key. I would be extremely grateful.
Thanks very much if you try and help me
Tony.
0
Comment
Question by:TREKY11
[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 70 total points
ID: 1352161
Hi,
Link this with your form code and make Form1 keypreview TRUE.

procedure TWebform.Form1KeyUp(Sender: TObject; var Key: Word;
  Shift: TShiftState);
var
  P : TPoint;
begin
  GetCursorPos(P);
  case Key of
    vk_Left :  Dec(P.X,5);
    vk_Right:  Inc(P.X,5);
    vk_Up   :  Dec(P.Y,5);
    vk_Down :  Inc(P.Y,5);
    vk_Home : ; //do what you want
    vk_Return: ; //do what you want
  end;
  SetCursorPos(P.X,P.Y);
end;

Regards, Igor
0
 

Author Comment

by:TREKY11
ID: 1352162
cHEER MATE THANKS ALLOT THIS CODE IS JUST PERFECT THANKS.
0

Featured Post

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

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…
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 this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

728 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