Hey,

I am still new to VB6, and very new to winsock, but I am making a chat client for my year 11 SDD (Software Design & Development) and I am having a problem with winsock.

Just a quick note: I have read / searched through all the posts on the forum including reading code posted on how to make a chat client but I am still having this problem.

The problem I am having is that winsock brakes down into smaller "objects" such as:

Winsock.listen
Winsock.localport

etc.

I can delcare winsock itself fine, but when it comes to delcaring the actual defined version of winsock ( e.g winsock.locaport ) I can’t do this, I never thought I would have to / You can declare sub variables but whatever help you guys could give would be greatly aprricated.

VB Code:
  1. Private Sub Form_Load()
  2. Dim winsock As String
  3. winsock.localport = 15151 'on the local machine try to use ports between 3000 and 50000
  4. winsock.listen ' start listening for incoming connections

The error I get is :

Complie Error - Invalid Qualifier

And when i declare winsock as data ( Which from what i have seen you have to do. )

I get the error:

Complie Error - Method or data member not found.

Thanks in advance.

Regards,

Josh