Clearing mouse click buffer

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
Paramvir
Posts: 44
Joined: Sun Mar 27, 2016 9:46 am
Location: India
Contact:

Clearing mouse click buffer

Post by Paramvir »

Hi

Clear typeahead command clears all pending keys from the keyboard buffer. It doesn't seem to have any affect on pending mouse clicks. Is there a way to clear mouse clicks buffer? Any suggestion please. Thank you all.
User avatar
AUGE_OHR
Posts: 2093
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: Clearing mouse click buffer

Post by AUGE_OHR »

try

Code: Select all

  HMG_CleanLastMouseMessage()
have fun
Jimmy
Paramvir
Posts: 44
Joined: Sun Mar 27, 2016 9:46 am
Location: India
Contact:

Re: Clearing mouse click buffer

Post by Paramvir »

AUGE_OHR wrote: Sun Jun 07, 2020 8:06 am try

Code: Select all

  HMG_CleanLastMouseMessage()
Great! Thank you Auge Ohr. However, this doesn't seem to solve my problem. The issue is that on my mixed console screen, there are mouse clickable text areas. On clicking an area, a "menu to" procedure is executed. Then when I press double click on a "menu to prompt" to execute a procedure associated with it, it works all right, but immediately, the clickable area beneath the "menu to prompt" seems to receive a mouse click and is executed. I have to press double click and not single click, "menu to prompt" to execute it because by default, menu to prompt accepts double click. If there is no clickable text area beneath a menu to prompt, nothing unexpected happens. I gave this command hmg_cleanlastmousemessage() after a "menu to prompt" procedure, but it doesn't seem to work. I even modified mouse settings like slowed the mouse (touchpad) double click speed and mouse pointer speed but no benefit. One simple solution for me is to lift up "the menu to box" on the screen, so that there is no clickable area below it. Thank you once again.
User avatar
mol
Posts: 3774
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: Clearing mouse click buffer

Post by mol »

Try to dosable cotrol event while executing your procedure:

Code: Select all

StopControlEventProcedure (L_labelName, FormName, .t.)
and at the finish, start it again:

Code: Select all

StopControlEventProcedure (L_labelName, FormName, .f.)
Paramvir
Posts: 44
Joined: Sun Mar 27, 2016 9:46 am
Location: India
Contact:

Re: Clearing mouse click buffer

Post by Paramvir »

mol wrote: Mon Jun 08, 2020 1:58 pm Try to dosable cotrol event while executing your procedure:

Code: Select all

StopControlEventProcedure (L_labelName, FormName, .t.)
and at the finish, start it again:

Code: Select all

StopControlEventProcedure (L_labelName, FormName, .f.)
Thank you Mol. I am not sure if I can use this func because mine is a mixed console application and there is no form as such. Thank you.
Post Reply