Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
KeyPress Event
Message
From
29/04/2006 05:56:05
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01117759
Message ID:
01117776
Views:
14
>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
>
Cecil,
F10 is reserved by windows (invokes menu). You can use it if set sysmenu is off (or control with API but doesn't worth IMHO).
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform