Solved

Cursor help

Posted on 1998-09-05
1
188 Views
Last Modified: 2010-04-04
I need to insert my cursor in delphi project
0
Comment
Question by:ILPowerSoft
[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
1 Comment
 
LVL 8

Accepted Solution

by:
ZifNab earned 20 total points
ID: 1338666
Hi ILPowerSoft,

Install custom cursor


Put the cursor in a .RES file. Make sure that the name of the cursor is ALL UPPERCASE, and make sure that the name of the .RES file is NOT the same as the name of your project's .DPR file. Link the .RES file into your project by adding the MYRES.RES to your source as :

 {$R *.RES}
 {$R MYRES.RES}

Use the LoadCursor API function to retrieve your cursor, using hInstance as the first parameter. The "Cursors property" online help has the information on the remaining steps required to make the cursor available to your application.

Here is the code to load the cursor.
procedure TForm1.FormCreate(Sender: TObject);begin
  Screen.Cursors [crMyCursor] := LoadCursor (hInstance, 'MYCURSOR'); //MYCURSOR is name of cursor in MYRES.RES
  Cursor := crMyCursor;
end;

Screen.Cursors [crCursor] := LoadCursor (hInstance, 'MYCURSOR');

Regards, Zif.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

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…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

756 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