Solved

CURSOR

Posted on 1998-06-11
2
238 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
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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

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…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

770 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