Information générale
Catégorie:
Contrôles ActiveX en VFP
>>>>Thanks for the response Ed. I have changed my mind and decided to subclass a form and add the Winsock control to the form in the class designer. I did this and used creatobject to create and instance of the new form class. However the DataArrival event does not seem to fire. Have I done something wrong or does your above explanation apply in this case also?
>>>>
>>>
>>>You still need to use VFPCOM to expose the event so that VFP will do something when the event fires. VFP does not link in events that it is internally unaware of; VFPCOM provides a mechanism to tie an event from a COM object to VFP through exposed memthods of a custom class.
>>>
>>>IOW, you've got to use VFPCOM to do what you need done. You need a way for VFP to detect the event and tie the event to something inside of the VFP application.
>>
>>OK thanks I am beginning to understand and that makes sense. Where can I get VFPCOM?
>
>msdn.microsoft.com/vfoxpro/downloads
Ed,
As it turns out what I was trying did work after all, I had left out an important piece of code in the form class I created. I subclass a form and added the MSWinsock control to the form. I then used createobject to create an instance of the class and now the DataArrival event fires just as it did in my previous application. Didn't need VFPCOM after all but thanks for the help.
David
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement