Hi all, stumbled across this forum about a week ago and it's great. My problem is this: I am trying to launch Telnet sessions from a form I've created using OOP and user specified criteria (host, port) and it's launching the program and then closing automatically. If I take the parameters out, the Telnet window launches and stays up. Interesting thing is that if you launch Telnet from the run command with parameters it will do what it does with my WinForm but if you launch it from the CLI then it stays up. This is using Visual Basic btw.
I guess what I'm asking is whether there is a way to launch it without calling cmd.exe?
Here's the code:
CODE
If radioTelnet.Checked = True Then
Dim aTelnet As New Telnet
Dim host, port As String
'Set application to Telnet and configure host parameters
aTelnet.App = "telnet.exe"
aTelnet.Host = "o " & Me.txtHost.Text
host = aTelnet.Host
aTelnet.Parameters = host
'Configure port parameters <<default to 23 if no port is specified)
If Not (Me.txtPort.Text = Nothing) Then
aTelnet.Port = " " & Me.txtPort.Text
port = aTelnet.Port
aTelnet.Parameters = port
Else
aTelnet.Port = " 23"
port = aTelnet.Port
aTelnet.Parameters = port
End If
aTelnet.LaunchApp()
End If
This post has been edited by souptoy: 23 Jan, 2008 - 02:55 PM