Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Keypress how-to
Message
From
08/08/2000 08:42:18
 
 
To
08/08/2000 08:29:46
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00402154
Message ID:
00402162
Views:
11
In the form's KEYPRESS event, put this:
LPARAMETERS nKeyCode, nShiftAltCtrl
do case
   case nKeyCode = 1	&& Home
      go top
      thisform.refresh()
      nodefault
   case nkeyCode = 6	&& End
      go bottom
      thisform.refresh()
      nodefault
   otherwise
      *	nothing special
endcase
In real life you'd probably call thisform.GoTop() and thisform.GoBottom() instead of embedding the 'go' and the 'refresh' (or whatever else) in the KEYPRESS event itself.

>I rcv'd a suggestion last week about using the KEYPRESS event in lieu of obsolete ON KEY LABEL or KEYBOARD commands. However, I'm not quite understanding how to get started.
>
>I would like to use the HOME and END keys to issue a GO TOP and GO BOTTOM only when I am on a grid on my form. I need an example of the syntax.
>
>Thanks
Rick Borup, MCSD

recursion (rE-kur'-shun) n.
  see recursion.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform