Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem using control whith equivalent to WithEvents
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Titre:
Problem using control whith equivalent to WithEvents
Divers
Thread ID:
00512555
Message ID:
00512555
Vues:
87
I am trying to use an OCX “S2TCPComms.dll” but they have sample code only for visual basic.
When I am trying to use the following code from basic

Public WithEvents sockfactory As TCPConnectionFactory
Set sockfactory = New TCPConnectionFactory

I don’t have problem to translate for vfoxpro

Sockfactory=createobject(“S2TCPComms.TCPConnectionFactory”)

But when I am trying to use :

Private Sub sockfactory_NewConnection(ByVal connection As S2TCPCOMMSLib.IConnection)
currPeerName = connection.PeerName
End Sub

I am getting an error when:
connection=createobject("S2TCPCOMMSLib.IConnection")
or
connection=createobject("S2TCPCOMMS.IConnection")

Class definition not found!

I notice also the they have samples for Delphi with the following notation

“Servers must respond to client events. Unfortunately this is not well handled in Delphi 4. If you are familiar with VB, Delphi does not have an equivalent to VBs ‘Dim WithEvents’ mechanism. However, provided with Symphonia is a package that contains a component with TCP events, that allows you to easily respond to client events. To use it, you must first install the package. The files required to install the package are contained in the ‘Sample\Delphi\DAG Server‘ folder. You can either install the ‘TCPEvents.bpl’ package or install a component using the ‘S2TCPCOMMSLibEvents.pas’ file, as shown below.”

It seems that Fox don’t have access to some of properties or methods of control
Is there any way to use the control with Visual Foxpro ?

Thanks Nick
----------------------------------------
Nikos Kiriakoulakos
Software Engineer
Dep. of Medical Informatics
Apollo Ltd.
Greece
----------------------------------------
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform