Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Telnet in Visual Basic

Posted on 1998-09-07
2
Medium Priority
?
1,683 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 80 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

NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

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…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

876 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