🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.nativeapi
5 messages
5 total messages Started by Phuoc Fri, 18 Jan 2008 12:33
How to Hide Mouse Pointer after an idle period?
#720
Author: Phuoc
Date: Fri, 18 Jan 2008 12:33
15 lines
1196 bytes
I want to hide the mouse pointer after idling for few seconds and bring it  
back as soon as it's moved. I've seen this effect in many programs. Is  
there any sample codes?

thanks
Phuoc Can HUA

-- 
===============================
I'm using BCB5 on XP Home
Re: How to Hide Mouse Pointer after an idle period?
#721
Author: Asger Joergensen
Date: Fri, 18 Jan 2008 14:05
28 lines
1604 bytes
Hi Phuoc 
 
 Phuoc says:
> I want to hide the mouse pointer after idling for few seconds and bring it
> back as soon as it's moved. I've seen this effect in many programs. Is
> there any sample codes?

How about setting Screen->Cursor = crNone;

or the API way

SetCursor function establishes the cursor shape. 

HCURSOR SetCursor(
    HCURSOR hCursor 	// handle of cursor
   );

or

SetSystemCursor (
    HCURSOR hcur,	// set specified system cursor to this cursor's contents, 
// then destroy this
    DWORD id	// system cursor specified by its identifier
   );

Kind regards
Asger
Re: How to Hide Mouse Pointer after an idle period?
#722
Author: Phuoc
Date: Fri, 18 Jan 2008 23:36
55 lines
2041 bytes
thank you for the one part of the solution.

and what's the best way to fire a timer? i.e. detect the idle pointer and  
start counting the time.
Also, how to catch the first mouse movement to bring back the pointer?



On Sat, 19 Jan 2008 01:05:45 +1100, Asger Joergensen <junk@Asger-P.dk>  
wrote:

>
> Hi Phuoc
> Phuoc says:
>> I want to hide the mouse pointer after idling for few seconds and bring  
>> it
>> back as soon as it's moved. I've seen this effect in many programs. Is
>> there any sample codes?
>
> How about setting Screen->Cursor = crNone;
>
> or the API way
>
> SetCursor function establishes the cursor shape.
>
> HCURSOR SetCursor(
>     HCURSOR hCursor 	// handle of cursor
>    );
>
> or
>
> SetSystemCursor (
>     HCURSOR hcur,	// set specified system cursor to this cursor's  
> contents,
> // then destroy this
>     DWORD id	// system cursor specified by its identifier
>    );
>
> Kind regards
> Asger



-- 
===============================
I'm using BCB5 on XP Home
Re: How to Hide Mouse Pointer after an idle period?
#723
Author: Remy Lebeau (TeamB)
Date: Sat, 19 Jan 2008 01:16
13 lines
1406 bytes
"Phuoc" <xyz.home@xyz.huaonline.com.xyz> wrote in message 
news:op.t45furn6ewlac1@centrino...

> and what's the best way to fire a timer? i.e. detect
> the idle pointer and start counting the time.

Look at GetLastInputInfo():

    http://msdn2.microsoft.com/en-us/library/ms646302.aspx


Gambit 
Re: How to Hide Mouse Pointer after an idle period?
#522
Author: Phuoc
Date: Sat, 26 Jan 2008 13:35
37 lines
1767 bytes
Thanks for that.
Is it possible to check mouse movement only? because I still want to allow  
key input.
I've tried SPI_SETMOUSEVANISH. But that seems only to work with edit box  
when a cursor is set.

On Sat, 19 Jan 2008 12:16:14 +1100, Remy Lebeau (TeamB)  
<no.spam@no.spam.com> wrote:

>
> "Phuoc" <xyz.home@xyz.huaonline.com.xyz> wrote in message
> news:op.t45furn6ewlac1@centrino...
>
>> and what's the best way to fire a timer? i.e. detect
>> the idle pointer and start counting the time.
>
> Look at GetLastInputInfo():
>
>     http://msdn2.microsoft.com/en-us/library/ms646302.aspx
>
>
> Gambit
>
>



-- 
===============================
I'm using BCB5 on XP Home
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads