Solved

CURSOR

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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…
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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

860 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