FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Read the Key state
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Read the Key state
Posted: Fri Jan 08, 2016 04: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 March-April 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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Read the Key state
Posted: Mon Jan 11, 2016 08:31 AM

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

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Read the Key state
Posted: Mon Jan 11, 2016 08: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 March-April 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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Read the Key state
Posted: Mon Jan 11, 2016 09: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
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Re: Read the Key state
Posted: Mon Jan 11, 2016 02:41 PM
Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Read the Key state
Posted: Mon Jan 11, 2016 03:42 PM
regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion