>You misspelled the method name (it must match the case).
>
>Vlad
>
>>I have this idea that since VFP5 does not have a "SENDKEYS" function like all versions of VB5, it would be nice to have. Rather than fiddle around with the API using SendMessage etc. I thought of creating an OCX in VB5 with a PUBLIC Function to do this for me.
>>
>>The Fn has this code:
>>Public Function SendKeyz(title,keyz,wait)
>>' title - title of the app window
>>' keyz - keystrokes to send
>>' wait - see hlp on this call
>> APPActivate title
>> SendKeys keyz, wait
>>End Sub
>>
>>I tested it in VB5 and it worked fine even sending keystrokes to the Fox command window. Create as OCX and tried to add it to a VFP5.0a form. VFP CRASHED every time with an invalid page fault.
>>
>>OK I changed the Function to a Public Procedure.Now VFP did not crash and so I ran the form.
Brilliant Vlad! Absolutely! Thanx mate. Only one more explanation needed -
Why does vfp crash when it is a function but not when a procedure??
Bernard