[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

Need help with Winsock

Posted on 2000-01-03
6
Medium Priority
?
186 Views
Last Modified: 2013-11-13
OK...here's a tough one...
I'm trying to prgram a Front-End for a game called Federation.  You can learn about this game at www.ibgames.net.  I'm trying to make a Front-End like FedTerm 32, the standard program that people use.  You can downlaod that program from www.ibgames.net.
WELL...I'm trying to connect to their server "federation.ibgames.net" port 23.  I have done that by using the Winsock control.  The thing that I can't figure out is how to get it to show up in a text box.  I have don't know how to do this, but I'm sure it has something to do with the "DataArrival" event.  And the "GetData" method of the Winsock control.
Please help me, becaseu I'm clueless.  Thanks a lot, and enjoy the 200 points if you can figure this out.
Thanks again,
~Chrono
0
Comment
Question by:Chrono
  • 3
  • 3
6 Comments
 

Accepted Solution

by:
Dark_Angel earned 800 total points
ID: 2322658
Yes, in the Winsock_DataArrival event
do this for an example.

Private Sub Winsock1_DataArrival(ByVal_ bytesTotal As Long)

Dim RecievedData As String
Winsock1.GetData (RecievedData,_ VBString)
Text1.Text = RecievedData
End Sub

Of course there's more to it to that. Like Byte's Recieved, Len you want etc.
But what is above is the Basic's of recieving data and putting it in it's palce.

Let me know if there's more you need to know.
0
 

Author Comment

by:Chrono
ID: 2324688
OK...I tried that, but it keeps giving me a "Expected: =" error on the lines that say "Winsock1.GetData (RecievedData,_ VBString)" and "Private Sub Winsock1_DataArrival(ByVal_ bytesTotal As Long)"  I think it's talking about the underscore.  Am I supposed to replace that with something?  Otherwise, wverything else seems fine... please help me out with this...

0
 

Expert Comment

by:Dark_Angel
ID: 2324954
I put the underscore in because it was on multiple line's and it go's on to next line to get the code, just remove the udnerscore alltogether and that example should work.
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 

Author Comment

by:Chrono
ID: 2328779
Whenever I get rid of the underscore, it immediately says that it expects a "=".  Any more ideas?
0
 

Expert Comment

by:Dark_Angel
ID: 2329017
remove the '()' aswell where the get data is.  sorry made mistake
0
 

Author Comment

by:Chrono
ID: 2330721
Well...that did SOMETHING...it gave me a "ÿýÿý"  I guess I can figure out the rest by myself.  Thanks a lot for your help.  This gave me a HUGE lead on what to do next....
Thanks again,
~Chrono
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Windows Script Host (WSH) has been part of Windows since Windows NT4. Windows Script Host provides architecture for building dynamic scripts that consist of a core object model, scripting hosts, and scripting engines. The key components of Window…
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
This video teaches viewers about errors in exception handling.
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
Suggested Courses

607 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question