?
Solved

SetSystemCursor + WIN2K ???

Posted on 2003-02-19
7
Medium Priority
?
678 Views
Last Modified: 2012-08-13
Hi,
I tried to set a systemwide new cursor with these lines:
..
  private
     NewArrow, OldArrow : HCursor;
..

{$R CURSORS.RES}

procedure TForm1.Button1Click(Sender: TObject);
begin
 NewArrow := LoadCursor(HINSTANCE,makeintresource(110));
 OldArrow := GetCursor; // LoadCursor(0, IDC_ARROW);
 SetSystemCursor(NewArrow, OCR_NORMAL);
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
 SetSystemCursor(OldArrow, OCR_NORMAL);
end;
..

The cursor changed to the new one, but there is no way to change back !! Is this a w2k related problem or what can I do ?
0
Comment
Question by:Brainwashed2
[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
7 Comments
 
LVL 1

Expert Comment

by:Kristian
ID: 7981305
i dont know much about this, but surely your loading a cursor, and setting the system to use it, but your only setting the pointer back not the cursor, so on your second click your replacing the new cursor with the new cursor which has the effect of no change.
Kristian
0
 
LVL 3

Expert Comment

by:gandalf_the_white
ID: 7982796
yes kristian is right

this line
>OldArrow := GetCursor; // LoadCursor(0, IDC_ARROW);
has to stand above this line
>NewArrow := LoadCursor(HINSTANCE,makeintresource(110));

0
 

Author Comment

by:Brainwashed2
ID: 7986449
no chance ! there is no problem to switch between IDC_ARROW and i.e. IDC_CROSS, but as soon i load an own *.cur the only way to replace is a reboot.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 1

Accepted Solution

by:
Kristian earned 800 total points
ID: 7992294
Exactly you need to LOAD your old cursor back in NOT set the pointer back to it. coz the pointer has new data there. you will need to LOAD a new cursor again.
you only have a certain number of cursors open in windows at a time. if you replace one, to get the old one back you will need to load it in like you did when you loaded yours the first time.
Kristian.
0
 

Expert Comment

by:CleanupPing
ID: 9317189
Brainwashed2:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
LVL 10

Expert Comment

by:kacor
ID: 9927976
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area for this question:
       to accept Kristian's answer
Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Some days and here is the Christmas Time. I wish good luck and good health for you all and for your loved ones

kacor
EE Cleanup Volunteer
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses
Course of the Month8 days, 23 hours left to enroll

765 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