Solved

Telnet in Visual Basic

Posted on 1998-09-07
2
1,639 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…

895 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now