Re: Detecting shift/alt keys



"Peter" <peter@xxxxxxxxxxx> wrote in message
news:qkef619mjb6forlu2fbks7t83d8r19s0k5@xxxxxxxxxx
> On Thu, 21 Apr 2005 14:24:54 +0100, Dodgy
> <Dodgy@xxxxxxxxxxxxxxxxxxxxx> wrote:
[...]
>> if HiWord(GetKeyState(vk_shift))<>0 then
>> // it's down
>> else
>> // it's up
>>
>>The alt key is vk_menu
[...]
> What I don't understand is where I should be checking. Form.onkeydown
> and form.onkeypress don't seem to do anything.

Link the controls to an action and check in the OnUpdate handler.

Groetjes,
Maarten Wiltink


.



Relevant Pages

  • Re: reading a opened file
    ... Open it with file mode fmShareDenyWrite, ... Groetjes, ... Maarten Wiltink ... Prev by Date: ...
    (alt.comp.lang.borland-delphi)
  • Re: Maximizing forms
    ... Type "WindowState", press F1, read help. ... Groetjes, ... Maarten Wiltink ... Prev by Date: ...
    (alt.comp.lang.borland-delphi)
  • Re: Variant testing
    ... Type "TVarData", press F1, read help. ... Groetjes, ... Maarten Wiltink ... Prev by Date: ...
    (alt.comp.lang.borland-delphi)
  • Re: Week Number to Calendar
    ... > TMyDTP = class ... Groetjes, ... Maarten Wiltink ... Prev by Date: ...
    (alt.comp.lang.borland-delphi)
  • Re: Delphi 7
    ... Ebay, canonically. ... Groetjes, ... Maarten Wiltink ... Prev by Date: ...
    (alt.comp.lang.borland-delphi)