Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Press windows key twice from within VFP using API?
Message
 
 
À
05/12/2005 11:48:48
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01074949
Message ID:
01074975
Vues:
10
You're welcome.

>Perfect Sergey, thanks! I actually came to the same conclusion in testing. I came up with wait window "" TIMEOUT 2 which seemed to work, but inkey(.1) is definitely better! Once, again, thanks!
>
>Tracy
>
>>Try to add some delay between them
>>keybd_event(VK_LWIN,0x5B,0,0)
>>keybd_event(VK_LWIN,0x5B,KEYEVENTF_KEYUP,0)
>>=INKEY(.1)
>>keybd_event(VK_LWIN,0x5B,0,0)
>>keybd_event(VK_LWIN,0x5B,KEYEVENTF_KEYUP,0)
>>
>>
>>>OK, this example works to press the left windows key once (the startmenu is displayed) but it fails to release it and press press it the 2nd time for some reason (or doesn't appear to because the startmenu remains displayed):
>>>
>>>#DEFINE VK_LWIN                 0x5B           && 0x5B and 91 both do not work
>>>#DEFINE VK_RWIN                 0x5C
>>>#DEFINE KEYEVENTF_KEYUP         0x2
>>>
>>>DECLARE keybd_event IN Win32API ;
>>>  SHORT bVk, SHORT bScan, INTEGER dwFlags, INTEGER deExtraInfo
>>>keybd_event(VK_LWIN,0x5B,0,0)
>>>keybd_event(VK_LWIN,0x5B,KEYEVENTF_KEYUP,0)
>>>keybd_event(VK_LWIN,0x5B,0,0)
>>>keybd_event(VK_LWIN,0x5B,KEYEVENTF_KEYUP,0)
>>>
>>>CLEAR DLLS keybd_event
>>>RETURN
>>>
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform