Re: VFP9: Keypress via command button? by Gene
Gene
Tue Oct 17 20:48:27 CDT 2006
[reordered to chronological]
Josh Assing <XjoshX@jassing.com> wrote:
>On Tue, 17 Oct 2006 12:51:09 -0600, "Roy Stoner" <rstoner1995@hotmail.com>
>wrote:
>>This stupid question has got me stumped! How do I press F2 key within
>>command button? Way back when I thought INKEY() was the answer, but....
>Keyboard {F2}
keyboard takes a string, so put it in quotes:
keyboard "{f2}"
Make sure that you issue the keyboard command before whatever
needs the keystrokes is called. For example, in my report class, I
set the paper orientation with sys(1037). First comes the keyboard
command, then the keystroke consumer.
keyboard "{tab}{tab}{tab}{tab}o{enter}" clear
sys(1037)
Sincerely,
Gene Wirchenko
Computerese Irregular Verb Conjugation:
I have preferences.
You have biases.
He/She has prejudices.