Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Keyboard {enter}
Message
 
À
15/07/2008 14:16:23
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Vista
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01331438
Message ID:
01331570
Vues:
10
Hi,

>i am trying to create a simple on screen keyboard where one of the commandbutton represents Enter key.

Where is the command button that simulates the enter key? The reason for asking this is that if the button is on a form, clicking the button moves the focus to the button. The enter key would then be send to the button, not the textbox. There are two ways around that:

a) You could add the button to a toolbar. Toolbars never receive the focus. To nicely arrange buttons inside the toolbar, you can add a container of the desired size and place the buttons inside the container.

b) In the click method of the button first call the textbox's SetFocus() method then simulate the key stroke. However, this has some more impact as setting the focus to a textbox not only triggers the whole validation process, it also moves the current cursor position.

BTW, if all you need is an on screen keyboard, have you checked out OSK.EXE which comes with Windows?
--
Christof
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform