Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
KeyPress Problem
Message
From
01/05/1998 15:29:00
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
01/05/1998 15:10:01
Jim Si
Alberta Research Council
Calgary, Alberta, Canada
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00096288
Message ID:
00096381
Views:
13
>>>>Keypress doesn't support Alt combination. Instead you would need something like lastkey(), inkey().
>>>
>>>
>>>If it is true that Keypress doesn't support Alt Combination, why when KeyPreview =.F. Alt combination does work as expected? If you don't belive me you can give it a try.
>>>
>>How as expected ? Have you put a wait window in alt+letter keypress case or alt+letter did what it should ? If latter in many cases you don't need to catch alt+letter. ie: Page.caption = "\>>Cetin
>
>Centin,
>
>Keypress does not support Alt combinations. It is what VFP help says. However when I have a following case statement in KeyPress event, it does execute the code upon one condition that is KeyPreview has to be .F..
>
> case nShiftAltCtrl = 4 .AND. nkeycode = 32
>* ALT + D keys
> NODEFAULT
> select mytable
> set order to anotherorder
> ThisForm.Refresh()
>
>I do not have anywhere on the form which has "\>
>But my problem is that when KeyPriview is .F. Ctrl + [combination letter] does not activate. If KeyPreview is .T., Ctrl combination key assignments are working but Alt combination key assignments are not working.
>
>Jim
Jim,
I learned a new thing. You're right. Now what to resolve it. You need keypreview = .t. so for alt keys you could assign them to invisible buttons with \gtsignhereCaption so alt combination would also work or set it as a menu shortcut key.
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
Next
Reply
Map
View

Click here to load this message in the networking platform