Solved

CURSOR

Posted on 1998-06-11
2
228 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
Comment Utility
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
Comment Utility
cHEER MATE THANKS ALLOT THIS CODE IS JUST PERFECT THANKS.
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
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…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

744 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

13 Experts available now in Live!

Get 1:1 Help Now