Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using an OCX created in VBCCEIN
Message
From
07/08/1998 00:32:17
 
 
To
06/08/1998 20:36:37
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00124638
Message ID:
00124695
Views:
12
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform