Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
KeyPress Event
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
KeyPress Event
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01117759
Message ID:
01117759
Vues:
43
I am trying to detect the KeyPress of the function key F10, but I am not sure if I have the code right. I am using a negative 9, or rather -9. Is this correct? See CASE nKeyCode = -9.
LPARAMETERS nKeyCode, nShiftAltCtrl
WITH ThisForm
  DO CASE
    CASE nKeyCode = 1		&& Home Key was pressed.
      ThisForm.cmdTop.Click()	&& Go to first record in Indexed table.
    CASE nKeyCode = 18	&& Page Up key was pressed.
      ThisForm.cmdPrevious.Click()
    CASE nKeyCode = 3		&& Page Down key was pressed.
      ThisForm.cmdNext.Click()
    CASE nKeyCode = 6		&& End key was pressed.
      ThisForm.cmdBottom.Click()
    CASE nKeyCode = 27		&& User hit Escape key
      ThisForm.cmdExit.Click()	&& Don't worry. If anything has changed,
                                && user is offered a chance to save the
                                && updates.
    CASE nKeyCode = -9		&& Function Key F10 was pressed.
	.cmdSave.Click()
  ENDCASE
ENDWITH
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform