Solved

Cursor help

Posted on 1998-09-05
1
185 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
Comment Utility
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

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…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
This video discusses moving either the default database or any database to a new volume.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

728 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

14 Experts available now in Live!

Get 1:1 Help Now