Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Cursor help

Posted on 1998-09-05
1
Medium Priority
?
193 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 80 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: 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

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

972 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