Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Keyboard driven...

Status
Not open for further replies.

ArevProgrammer

Programmer
Apr 7, 2001
38
0
0
US
Hello,

Is it possible to make a VFP 7.0 app keyboard driven w/o
using the mouse all of the time? I have several different
screens in FPD 2.6 that I think would be easier to implement
if this could be done.
If this is possible, please share some ideas and what events the code should be stuffed into.

Thanks,

Scott K. Rome was not built in a day. Be patient!
 
What exactly do you mean? With TAB/SHIFT TAB you can move around, with \< you can make hot keys, and with ON KEY LABEL you can (re)define the funtion keys. What more could a person want? :)

Dave S.
 
ArevProgrammer

The only constraint is that you will not be able to remove or disable the mouse.

There are threads on this topic - the biggest problem you will find as a developer is adopting the necessary mindset to code the application.

Once you are in a mental &quot;no mouse&quot; mode, the coding problems are not insurmountable - if you inadvertedly slip back into &quot;mouse&quot; or normal mode, then you need to give yourself a seriously hard time to get back into &quot;no mouse&quot; mode.[poke] HTH

Chris [pc2]
 
I am a keyboard user, myself, and always try to code my forms so almost (if not) everything can be done with the keyboard. Here are some tips that I use:

- Create keyboard shortcuts to all of your command buttons. You do this by prefacing the letter in the caption with &quot;\<&quot;. So, to underline the X in &quot;Exit&quot;, you would make the caption &quot;E\<xit&quot;. Pressing ALT+X will trigger a Click on the button.

- You can do the same with text boxes and other groups by putting these shortcuts on the label objects. So, if you have a text box for entering a date, and a label in front of it with &quot;\<Date&quot; as the caption, pressing ALT+D will try to put focus on the label. Failing this (because it can't have the focus) it will move forward through the tab order until it finds a control that it CAN focus on.

- You can TAB into a grid, but you can't TAB back out...the TAB key moves through the grid fields instead. You can get around this by using an ALT+letter combination to move to a specific control (user action) or you can code the TAB key to move to the next control using the KeyPress event of the text boxes in the grid.

- If you set the KEYPREVIEW property of your form to .T., you can process keystrokes in the KeyPress event of the form. For instance, you can program the F2-F12 keys to jump to a certain control. (Don't change F1...it's a Windows standard to open Help.)

Hope these help,

Ian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top