Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SYS(1500) Help
Message
From
09/01/2008 04:06:06
Suhas Hegde
Dental Surgeon
Sirsi, India
 
 
To
08/01/2008 09:53:52
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01280185
Message ID:
01280477
Views:
22
Hi,


Why depend on Sysmenu ? Why not use Api?
LOCAL lcFile

#define KEYEVENTF_KEYUP  2
#define KEYEVENTF_EXTENDEDKEY  1 
#define CTRL 0x11
#define Akey  0x41
#define Ckey  0x43

DECLARE INTEGER keybd_event IN Win32API ;
      INTEGER, INTEGER, INTEGER, INTEGER

lcFile = GETFILE("prg")
MODIFY COMMAND (lcFile) NOWAIT
      
keybd_event( CTRL,    0, KEYEVENTF_EXTENDEDKEY , 0 ) && ctrl key down
keybd_event( AKEY,    0, KEYEVENTF_EXTENDEDKEY , 0 ) && A key down

keybd_event( CTRL,    0, KEYEVENTF_EXTENDEDKEY+KEYEVENTF_KEYUP, 0 ) && ctrl key up
keybd_event( CKEY,    0, KEYEVENTF_EXTENDEDKEY+KEYEVENTF_KEYUP, 0 ) && C key up
Previous
Reply
Map
View

Click here to load this message in the networking platform