Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Winsock without Form ? (Beginner)

Status
Not open for further replies.

MikiBear

Programmer
Jul 23, 2002
3
DE
Can anyone tell me, how I can use a winsock control without Form. I need this to build a Dll function, which checks, if a TCP/IP connection is available. The application should not go to the foreground, when calling the function.
 
If you reference the winsock in the same way as normal(as if you had a form) then in your code use

Dim wsk as New Winsock

that should work fine. You could also look into using the winsock API though, it may be quicker, not to sure by how much though.


Matt
 
To MatDavies:

I tried this before. Winsock must be declared with "WithEvents" to receive the Winsock events, but this doesn't run with "New". Also using the term "New Winsock" gives an error.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top