Read the Key state

Read the Key state

Postby Silvio.Falconi » Fri Jan 08, 2016 4:39 pm

I have an app with main window

I wish the procedure run another function when the user not use the mouse or any key of keyboard

the function I wish run must be as a screensaver ( spot of Products) when the user press a key or move the mouse it must closed

how make this ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7048
Joined: Thu Oct 18, 2012 7:17 pm

Re: Read the Key state

Postby Antonio Linares » Mon Jan 11, 2016 8:31 am

Use a timer, from its action check the mouse and keyboard
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42076
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Read the Key state

Postby Silvio.Falconi » Mon Jan 11, 2016 8:47 am

Antonio the timer is ok , I not Know how check the mouse and keyboard
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7048
Joined: Thu Oct 18, 2012 7:17 pm

Re: Read the Key state

Postby Antonio Linares » Mon Jan 11, 2016 9:16 am

Use GetCursorPos() to know where the mouse is and to check if it has changed its position

Keep the old position in a static variable
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42076
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Read the Key state

Postby Horizon » Mon Jan 11, 2016 2:41 pm

Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Re: Read the Key state

Postby Antonio Linares » Mon Jan 11, 2016 3:42 pm

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42076
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 76 guests