FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour left mouse button condition
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
left mouse button condition
Posted: Wed Mar 16, 2016 08:06 AM

How can you determine that the left mouse button is pressed (function MLeftDown always returns .F.) ?

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: left mouse button condition
Posted: Wed Mar 16, 2016 08:23 AM

oControl:bLClicked := { | nRow, nCol, nFlags | MsgInfo( "left mouse pressed" ) }

or oWnd or oDlg instead of oControl

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: left mouse button condition
Posted: Wed Mar 16, 2016 09:05 AM

bRClicked - handles the event of pressing the left mouse button. But I'm interested in the status of this button when you move the mouse cursor across several controls.
Each of these controls has its bMMoved in which the function is called. If left mouse button pressed, the function is executed

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: left mouse button condition
Posted: Wed Mar 16, 2016 09:29 AM
Then you have to use Windows function GetAsyncKeyState():

https://msdn.microsoft.com/en-us/library/windows/desktop/ms646293(v=vs.85).aspx
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: left mouse button condition
Posted: Wed Mar 16, 2016 09:43 AM

Thanks, Antonio !

Continue the discussion