Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Laskey(): Ctrl+E and Down arrow values are the same !?
Message
From
15/10/1998 10:55:57
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
15/10/1998 10:49:47
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00146830
Message ID:
00147147
Views:
39
>>>Cetin, I tried to dedect row change in grid beforerowcolchange using your code:
>>>
>>>llChangingRow = .f.
>>>with this
>>> if mdown()
>>> lnBottom = .top+.headerheight+ .relativerow * .rowheight
>>> lnTop = lnBottom - this.rowheight
>>> lnMouseRowPos = mrow(wontop(),3)
>>> llChangingRow = !between(lnMouseRowPos,lnTop, lnBottom)
>>> else
>>> llChangingRow = inlist(lastkey(),24,5,18,3,145)
>>>...
>>>
>>>lastkey() value 5 is used to dedect down arrow. However, value 5 is returned
>>>also when user presses Ctrl+E key.
>>>
>>>I strongly do not wish to execute row change logic when Ctrl+E key is pressed.
>>>In my program, ctrl+e causes beforerowcolchange event to occur.
>>>How to avoid this?
>>>
>>>Also, 145 code is returned only by alt+down arrow. Why this value is
>>>included in inlist() ?
>>Andrus,
>>But it's abnormal Ctrl+E invoking brcc event in a grid. Might it be in menu those keys are used as shortcuts ?
>
>Yes, Ctrl+E invokes the invoice form from customer table.
>It is menu hotkey.
>I have all ctrl keys used, no free keys. So I want to use ctrl+E
>to invoke other form and this invokes beforerowcolchange event.
>After closing this other form I want to continue current row editing.
>
>Maybe to dedect holding ctrl key using getkeystate() api function?
>I put your brcc event to real program and got immediately some difficult problems, this one was one of them.
Andrus,
It's only brcc code for detecting rowchange. It's not fired if you're leaving grid (invoke another conrol, form etc). Grid.valid code supports check and works seamlesly in my own class. If you want and be patient, I can email you a copy of class with a sample form.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform