Information générale
Catégorie:
Contrôles ActiveX en VFP
I have been using a MSWinsock control on a form in an application and now wish to using it in a program and want to put code in the dataarrival event. I have tried the following but it does not work I get an error that says 'Object class is invalid for this container.'
Osock = createobject("PrgSocket")
Osock.LocalPort = 5001
Osock.Protocol = 1
Define Class PrgSocket as OleControl
Oleclass = "MSWinsock.Winsock"
function DataArrival
lparameter bytestotal
wait window allt(str(bytestotal)) nowait
return
endfunc
enddefine
This however does work but I don't know how to add code to the dataarrival event.
Osock = createobject("MSWinsock.Winsock")
Osock.Protocol = 1
Osock.LocalPort = 5001
Any ideas would be greatly appreciated.
Thanks for the help!
David
Suivant
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