General information
Category:
ActiveX controls in 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
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only