Solved

Telnet in Visual Basic

Posted on 1998-09-07
2
1,643 Views
Last Modified: 2013-11-25
I need to know how to connect to a telnet site in VB.

I will need to be able to see the output of it, and be able to manipulate, and also input info to the telnet server.... basiclly I'm making an enhansed telnet client just for a specific server.

I need to be able to insert the IP address and port number of it.

I use VB1 and VB5, so whichever one you use, you can tell me about (although I don't think VB1 has the capabilities)

Thanks!

If it requires a special file (like an OCX), please tell me where I can get it then.
0
Comment
Question by:eversoslightly
2 Comments
 
LVL 1

Accepted Solution

by:
kacklehorn earned 20 total points
ID: 1433424
Put a msWinsock control..(found in VB5) on a form with a large textbox(text1) and three small textboxes IPaddress(text2) port#(text3) Commands(text4). Two command buttons:

Option Explicit

Private Sub Command1_Click()
    Winsock1.Connect Text2.Text, Text3.Text
End Sub

Private Sub Command2_Click()
    Winsock1.SendData Text4.Text
End Sub

Private Sub Form_Load()

End Sub

Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Dim buffer As String
Winsock1.GetData buffer, vbString
Text1.Text = buffer
End Sub


Thats it..Enjoy
0
 
LVL 1

Author Comment

by:eversoslightly
ID: 1433425
Thanks!  Worked like a charm :)

Ever-So
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

786 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