Passage d'arguments vers une classe

cs_TomTom27 Messages postés 48 Date d'inscription mercredi 21 janvier 2004 Statut Membre Dernière intervention 2 juin 2005 - 26 avril 2004 à 13:51
cs_DARKSIDIOUS Messages postés 15814 Date d'inscription jeudi 8 août 2002 Statut Membre Dernière intervention 4 mars 2013 - 26 avril 2004 à 13:59
je veux passer un ctrl winsock ... mais ca ne fonctionne pas

Dim Adresse_IP As String
Dim Num_Port As String
Dim Objet_Win As New Winsock

Public Property Let Socket(Winsock_Obj As Winsock)
Objet_Winsock = Winsock_Obj
 :question) End Property

2 réponses

slr Messages postés 75 Date d'inscription mercredi 23 octobre 2002 Statut Membre Dernière intervention 13 juillet 2004
26 avril 2004 à 13:54
essaye en mettant Set devant :

Dim Adresse_IP As String
Dim Num_Port As String
Dim Objet_Win As Winsock

Public Property Let Socket(Winsock_Obj As Winsock)
Set Objet_Winsock = Winsock_Obj
End Property

slr
0
cs_DARKSIDIOUS Messages postés 15814 Date d'inscription jeudi 8 août 2002 Statut Membre Dernière intervention 4 mars 2013 130
26 avril 2004 à 13:59
Attention, pour le passage d'objet, ce n'est pas une propriété Let qu'il faut, mais une proriété Set :

Public Property Set Socket(Winsock_Obj As Winsock)
Set Objet_Win = Winsock_Obj
End Property

DarK Sidious

[Responsable API/VB du site www.ProgOtoP.com]
Téléchargez ProgOtoP API Viewer
0
Rejoignez-nous