Board index » delphi » setting the Mouse cursor

setting the Mouse cursor

Hello
I have put the statement (Delphi 6)
Form1.Cursor := ccArrow;
in the OnMouseUp handler and OnMouseUp gets called ok, and the cursor gets
updated ok, but even when the cursor variable is updated as it should, the
visible cursor itself does NOT change as it should.
The statements on OnMouseMove all execute ok, and in that handler
I checked if the right mouse button was pressed. If it was I set the cursor
to crDrag, else I changed it to crArrow. Everything in OnMouseMove works
100%
Question: How do I either a) change the mouse cursor back; I think there may
be some kind of update I need to do after I change it back, go figure, or
globally change the mouse cursor via the Mouse (type TMouse) variable. I
already use Mouse.CursorPos quite successfully, but didn't see any way to
handle the Cursor that way.

I have spent time trying to fix this in many ways, etc.

Hope someone can help

Thanks,

Gino

-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----

 

Re:setting the Mouse cursor


I ran into the same problem, and I still don't know why it doesn't work. I
think it should. There's a workaround, however, an that's to use the higher
level TScreen instance's Cursor property. The  instance is called "Screen",
so what you can do is:

Screen.Cursor:=ccArrow;

At least that worked for me.  Good luck.

\//\//./\\/\\.

Quote
"Gino Costa" <gco...@beld.net> wrote in message

news:3c070bc1_3@corp.newsgroups.com...
Quote
> Hello
> I have put the statement (Delphi 6)
> Form1.Cursor := ccArrow;
> in the OnMouseUp handler and OnMouseUp gets called ok, and the cursor gets
> updated ok, but even when the cursor variable is updated as it should, the
> visible cursor itself does NOT change as it should.
> The statements on OnMouseMove all execute ok, and in that handler
> I checked if the right mouse button was pressed. If it was I set the
cursor
> to crDrag, else I changed it to crArrow. Everything in OnMouseMove works
> 100%
> Question: How do I either a) change the mouse cursor back; I think there
may
> be some kind of update I need to do after I change it back, go figure, or
> globally change the mouse cursor via the Mouse (type TMouse) variable. I
> already use Mouse.CursorPos quite successfully, but didn't see any way to
> handle the Cursor that way.

> I have spent time trying to fix this in many ways, etc.

> Hope someone can help

> Thanks,

> Gino

> -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
> http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
> -----==  Over 80,000 Newsgroups - 16 Different Servers! =-----

Re:setting the Mouse cursor


Hello
Thank you very much. Your solution works very nice, but there's one thing.
If I change the Screen.Cursor, it overrides all future cursor changes when
the curcor goes over a control. I made my code work good, but I have other
controls that have different cursor shapes when the mouse goes over them,
and after I set Screen.Cursor, these other cursor assignments no longer
work. is there a statement that makes screen.Cursor no longer override these
changes after I do it?
I would want to do:
Screen.Cursor := crArrow;
Eliminate Override statement;
Can you help me?

Thanks,
Gino

Quote
"Wade Myers" <wmy...@exoterix.com> wrote in message

news:9u8u9n$f8q@dispatch.concentric.net...

Quote
> I ran into the same problem, and I still don't know why it doesn't work. I
> think it should. There's a workaround, however, an that's to use the
higher
> level TScreen instance's Cursor property. The  instance is called
"Screen",
> so what you can do is:

> Screen.Cursor:=ccArrow;

> At least that worked for me.  Good luck.

> \//\//./\\/\\.

> "Gino Costa" <gco...@beld.net> wrote in message
> news:3c070bc1_3@corp.newsgroups.com...
> > Hello
> > I have put the statement (Delphi 6)
> > Form1.Cursor := ccArrow;
> > in the OnMouseUp handler and OnMouseUp gets called ok, and the cursor
gets
> > updated ok, but even when the cursor variable is updated as it should,
the
> > visible cursor itself does NOT change as it should.
> > The statements on OnMouseMove all execute ok, and in that handler
> > I checked if the right mouse button was pressed. If it was I set the
> cursor
> > to crDrag, else I changed it to crArrow. Everything in OnMouseMove works
> > 100%
> > Question: How do I either a) change the mouse cursor back; I think there
> may
> > be some kind of update I need to do after I change it back, go figure,
or
> > globally change the mouse cursor via the Mouse (type TMouse) variable. I
> > already use Mouse.CursorPos quite successfully, but didn't see any way
to
> > handle the Cursor that way.

> > I have spent time trying to fix this in many ways, etc.

> > Hope someone can help

> > Thanks,

> > Gino

> > -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
> > http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
> > -----==  Over 80,000 Newsgroups - 16 Different Servers! =-----

-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----

Other Threads