Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using an OCX created in VBCCEIN
Message
De
07/08/1998 00:32:17
 
 
À
06/08/1998 20:36:37
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00124638
Message ID:
00124695
Vues:
13
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform