Re: Press Windows Key twice from within VFP using API by Tracy
Tracy
Mon Dec 05 10:32:22 CST 2005
This is a multi-part message in MIME format.
------=_NextPart_000_000A_01C5F98F.8F01B320
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Any idea why the below code returns "Function name missing )."
#DEFINE VK_LWIN =3D 0x5B && 0x5B and 91 both do not work
#DEFINE VK_RWIN =3D 0x5C
#DEFINE KEYEVENTF_KEYUP 2
DECLARE keybd_event IN Win32API ;
SHORT bVk, SHORT bScan, INTEGER dwFlags, INTEGER deExtraInfo
=3Dkeybd_event(VK_LWIN,0,0,0)
=3Dkeybd_event(VK_LWIN,0,KEYEVENTF_KEYUP,0)
CLEAR DLLS keybd_event
RETURN
------=_NextPart_000_000A_01C5F98F.8F01B320
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2769" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV>
<P><FONT face=3DArial size=3D2>Any idea why the below code returns =
"Function name=20
missing )."<BR></FONT><FONT face=3DArial size=3D2></FONT></P>
<P><FONT size=3D2><FONT face=3D"Courier New">#<SPAN =
class=3Dvfpreserved>DEFINE</SPAN>=20
VK_LWIN =3D <SPAN=20
class=3Dvfpliteral>0x5B</SPAN> &=
nbsp; =20
<SPAN class=3Dvfpcomment>&& 0x5B and 91 both do not =
work</SPAN><BR>#<SPAN=20
class=3Dvfpreserved>DEFINE</SPAN> VK_RWIN =3D <SPAN=20
class=3Dvfpliteral>0x5C</SPAN><BR>#<SPAN =
class=3Dvfpreserved>DEFINE</SPAN>=20
KEYEVENTF_KEYUP <SPAN=20
class=3Dvfpliteral>2</SPAN><BR><BR><SPAN =
class=3Dvfpreserved>DECLARE</SPAN>=20
keybd_event <SPAN class=3Dvfpreserved>IN</SPAN> Win32API ;<BR> =
SHORT bVk,=20
SHORT bScan, <SPAN class=3Dvfpreserved>INTEGER</SPAN> dwFlags, <SPAN=20
class=3Dvfpreserved>INTEGER</SPAN> =
deExtraInfo<BR>=3Dkeybd_event(VK_LWIN,<SPAN=20
class=3Dvfpliteral>0</SPAN>,<SPAN class=3Dvfpliteral>0</SPAN>,<SPAN=20
class=3Dvfpliteral>0</SPAN>)<BR>=3Dkeybd_event(VK_LWIN,<SPAN=20
class=3Dvfpliteral>0</SPAN>,KEYEVENTF_KEYUP,<SPAN=20
class=3Dvfpliteral>0</SPAN>)<BR><BR><SPAN =
class=3Dvfpreserved>CLEAR</SPAN> <SPAN=20
class=3Dvfpreserved>DLLS</SPAN> keybd_event<BR><SPAN=20
class=3Dvfpreserved>RETURN</SPAN></SPAN></FONT></P></FONT></DIV></BODY></=
HTML>
------=_NextPart_000_000A_01C5F98F.8F01B320--