Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MouseDown on Grid
Message
From
15/06/2022 06:07:25
 
 
To
15/06/2022 05:47:01
Lutz Scheffler (Online)
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
01684512
Message ID:
01684520
Views:
47
MouseDown event is executed in the current Grid control not in the Grid, Only if you have AllowCellSelection = .f. then Grid MouseDown event will be executed.
If you want it in Grid you must send it from current Grid control into Grid level.


>Hi Borislav
>Thanks
>KEY+Shift goes through KeyPress - this works.
>
>I need Mouse+ SHIFT or CTRL
>
>Lutz
>>With a little help from WIN32API project from VFPx
>>
>>#define VK_SHIFT   0x10    && SHIFT key
>>#define VK_CONTROL 0x11    && CTRL key
>>#define VK_MENU    0x12    && ALT key
>>
>>DECLARE INTEGER GetAsyncKeyState IN user32;
>>     INTEGER vKey
>>
>>lbLoop = .t.
>>DO WHILE lbLoop 
>>   CLEAR
>>   ? "Shift", GetAsyncKeyState (VK_SHIFT)        # 0
>>   ? "Ctrl" , GetAsyncKeyState (VK_CONTROL) # 0
>>   ? "Alt"  , GetAsyncKeyState (VK_MENU)        # 0
>>   lbLoop = INKEY(0) # 27 && Press ESC to exit the loop, press any other key to see the result. To Alt+A, Ctrl+A, Shift+A, only A etc. becuase if you press only Shift/Ctril/Alt Inkey(0) do not work :-)
>>ENDDO
>>
>>
>>
>>
>>
>>>Hi Hank,
>>>
>>>Thanks
>>>CRLT+Mouse; SHIFT+Mouse. I need to figure out the CTRL and the SHIFT, Mouse alone works as expected.
>>>
>>>Lutz
>>>>Have you checked mdown() value in BeforeRowColChange?
>>>>
>>>>>Hi All,
>>>>>
>>>>>I have an oddness in grids events.
>>>>>
>>>>>The event MousDown is called by the system, but code in MousDown is not executed in this moment but later on.
>>>>>
>>>>>My MousDown looks like
>>>>>
>>>>>LPARAMETERS ;
>>>>> tnButton,;
>>>>> tnShift,;
>>>>> tnXCoord,;
>>>>> tnYCoord,;
>>>>> toColumn
>>>>>
>>>>>DEBUGOUT PROGRAM(),' ',ALIAS(),' ',RECNO()
>>>>>
>>>>>If I MouseClick I got EventLog / Debuglog
>>>>>
>>>>>46736,246, frmnutzer.pgfmain.page1.cntlist.grdlistgrid.MouseDown(1,0, 2,0, 461,0, 208,0)
>>>>>46736,246, frmnutzer.pgfmain.page1.cntlist.grdlistgrid.BeforeRowColChange(3,0)
>>>>>46736,246, frmnutzer.pgfmain.page1.cntlist.grdlistgrid.column3.text1.When()
>>>>>46736,246, frmnutzer.pgfmain.page1.cntlist.grdlistgrid.column3.text1.Valid()
>>>>>46736,249, frmnutzer.pgfmain.page1.cntlist.grdlistgrid.column3.text1.Valid()
>>>>>46736,249, frmnutzer.pgfmain.page1.cntlist.grdlistgrid.column3.text1.When()
>>>>>46736,254, frmnutzer.pgfmain.page1.cntlist.grdlistgrid.AfterRowColChange(3,0)
>>>>>46736,262, frmnutzer.pgfmain.page1.cntlist.grdlistgrid.column3.text1.MouseDown(1,0, 2,0, 461,0, 208,0)
>>>>>FRMNUTZER.PGFMAIN.PAGE1.CNTLIST.GRDLISTGRID.MOUSEDOWN   CURMITARBEITER_EDIT           16,0
>>>>>
>>>>>The last line is the DEBUGOUT of MouseDown
>>>>>
>>>>>Yeah, nice, I would like to know if the mouse is pressed with SHIFT or CTRL, if I reach BeforeRowColChange...
>>>>>
>>>>>Could somebody please check that he got this odd event behaviour? Does somebody have an idea how to get the code running the right moment?
>>>>>
>>>>>Thanks
>>>>>Lutz
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform