Welcome to Dream.In.Code
Become a VB Expert!

Join 149,923 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 1,945 people online right now. Registration is fast and FREE... Join Now!




winsock

 
Reply to this topicStart new topic

winsock, winsock in VB

maynur
14 Jan, 2008 - 12:58 AM
Post #1

New D.I.C Head
*

Joined: 14 Jan, 2008
Posts: 1

Hai All

I try to connecting visual basic with twido bt ethernet,
i wrote this on button connect :
Do While ((Timer < StartTime + 2) And (Winsock1.State <> 7))
DoEvents
Loop

If (Winsock1.State = 7) Then
txtStatus.Text = "Connected"
txtStatus.BackColor = &HFF00&
Else
txtStatus.Text = "Can't connect to " + txtIP.Text
txtStatus.BackColor = &HFF
End If

But the winsock1.state = 6 or 9 ...
How could i changed it to 7 for connected?
Please send me a real sample code...
Thank you somuch

Regards'

May Nur
User is offlineProfile CardPM
+Quote Post

LookNAO
RE: Winsock
17 Jan, 2008 - 12:52 PM
Post #2

D.I.C Head
**

Joined: 28 Dec, 2007
Posts: 66



Thanked: 1 times
My Contributions
CODE


winsock1.Connect ("ip.add.res.s", port number)



User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/8/09 02:52PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month