Solved

Cursor help

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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
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…

773 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