error 40020: Invalid operation at current state
error 40020: Invalid operation at current state
error 40020: Invalid operation at current state
error 40020: Invalid operation at current state
error 40020: Invalid operation at current state
error 40020: Invalid operation at current state error 40020: Invalid operation at current state error 40020: Invalid operation at current state error 40020: Invalid operation at current state error 40020: Invalid operation at current state error 40020: Invalid operation at current state error 40020: Invalid operation at current state error 40020: Invalid operation at current state
error 40020: Invalid operation at current state error 40020: Invalid operation at current state
error 40020: Invalid operation at current state
Go Back  Xtreme Visual Basic Talk > > > error 40020: Invalid operation at current state


Reply
 
Thread Tools Display Modes
  #1  
Old 03-19-2009, 12:03 AM
jerome_gail26 jerome_gail26 is offline
Junior Contributor
 
Join Date: Mar 2009
Location: philippines
Posts: 204
Question error 40020: Invalid operation at current state


i am using Winsock control (sp6). I use commamdbutton named cmdConncet, on Form_Load i made
Winsock1.LocalPort = 8080
Winsock1.Listen

then on cmdConnect_Click

Winsock1.RemoteHost = "192.168.1.33"
Winsock1.RemotePort = 8080
Winsock1.Connect

when i click cmdConncet I got Error message saying Invalid operation at current state. then it highlight Winsock1.RemoteHost = "192.168.1.33".

i have tried to put the default gateway which is 192.168.1.1 and the address of my own 192.168.1.38 also tried to connect with computerName "Gail" still error 40020 occured.

what is/are the possible cause of this error? What address should i put at .RemoteHost? ip address, default gateway?

also, (out of this topic)

is it possible to make many winsock in 1 form and connect each of it with other computers?
Reply With Quote
  #2  
Old 03-20-2009, 08:35 AM
mkaras's Avatar
mkaraserror 40020: Invalid operation at current state mkaras is offline
Ultimate Contributor

Retired Leader
* Expert *
 
Join Date: Mar 2004
Location: Beaverton, OR
Posts: 1,874
Default

Yes it is possible to have multiple Winsock controls on one form. I have a large industrial application that I wrote that uses four Winsock controls with each two pairs of controls connecting to different computers.

Michael Karas
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
error 40020: Invalid operation at current state
error 40020: Invalid operation at current state
error 40020: Invalid operation at current state error 40020: Invalid operation at current state
error 40020: Invalid operation at current state
error 40020: Invalid operation at current state
error 40020: Invalid operation at current state error 40020: Invalid operation at current state error 40020: Invalid operation at current state error 40020: Invalid operation at current state error 40020: Invalid operation at current state error 40020: Invalid operation at current state error 40020: Invalid operation at current state
error 40020: Invalid operation at current state
error 40020: Invalid operation at current state
 
error 40020: Invalid operation at current state
error 40020: Invalid operation at current state
 
-->