The Telnet ActiveX control lets you send commands to a Telnet server from a Visual Basic application. The control connects to the server and sends commands with the proper syntax. Telnet servers are older command-line applications that let administrators control server files and configurations.
- Skill level:
Other People Are Reading
Click the Windows "Start" button and select "All Programs." Click "Microsoft .NET Framework," then click "Visual Studio" to open the Visual Basic programming platform.
Click the Visual Basic project name in the list of "Recent Projects" to open the project files. After the project files load, right-click the form that you want to use in "Solution Explorer." Click "View Code" to open the Visual Basic code editor.
Connect to the Telnet server. The following code shows you how to connect to the Telnet server and send the server your username and password to log in:
Telnet1.Send "username" & vbCrLf
Telnet1.Send "pass" & vbCrLf
Replace "server" with the server name of your Telnet server. Replace "username" and "pass" with your own Telnet username and password.
Send commands to the server. For instance, if you want to run the application named "ReportApp," type the following code in the Visual Basic editor:
Telnet1.Send "ReportApp" & vbCrLf
Continue using the "Send" function to send commands to the server.
Close the server connection. After you finish sending commands, add the following final Visual Basic code to close the connection:
- 20 of the funniest online reviews ever
- 14 Biggest lies people tell in online dating sites
- Hilarious things Google thinks you're trying to search for