Hi,
ich möchte für mein Projekt die CSocketMaster-Klasse benutzen:
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=52072&lngWId=1
Das ganze besteht aus einem Modul und einem Klassenmodul.
In der Readme steht folgendes:
1) Add CSocketMaster.cls and modSocketMaster.bas to your project.
2) In a Form, Class or UserControl add this line in the declaration area for each socket you want to use:
Dim WithEvents NameOfSocket As CSocketMaster
where 'NameOfSocket' is any name you want for the socket.
3) Finally you need to create the object before using it. Add this line in a sub or funtion:
Set NameOfSocket = New CSocketMaster
That's it.
Das ist auch alles kein Problem, jedoch möchte ich von einem weiteren Modul folgenden Befehl ausführen:
Winsock.SendData "hallo"
"Dim WithEvents Winsock As CSocketMaster"
und
"Set Winsock = New CSocketMaster"
stehen bei mir in Form1. Wenn ich aber aus einem Modul nun mit Winsock opperieren möchte bekomm ich diesen Fehler:
Objekt erforderlich
Naja was kann ich da machen?
ich möchte für mein Projekt die CSocketMaster-Klasse benutzen:
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=52072&lngWId=1
Das ganze besteht aus einem Modul und einem Klassenmodul.
In der Readme steht folgendes:
1) Add CSocketMaster.cls and modSocketMaster.bas to your project.
2) In a Form, Class or UserControl add this line in the declaration area for each socket you want to use:
Dim WithEvents NameOfSocket As CSocketMaster
where 'NameOfSocket' is any name you want for the socket.
3) Finally you need to create the object before using it. Add this line in a sub or funtion:
Set NameOfSocket = New CSocketMaster
That's it.
Das ist auch alles kein Problem, jedoch möchte ich von einem weiteren Modul folgenden Befehl ausführen:
Winsock.SendData "hallo"
"Dim WithEvents Winsock As CSocketMaster"
und
"Set Winsock = New CSocketMaster"
stehen bei mir in Form1. Wenn ich aber aus einem Modul nun mit Winsock opperieren möchte bekomm ich diesen Fehler:
Objekt erforderlich
Naja was kann ich da machen?