Hi guys im trying to telnet to an IP address that is entered into a textbox from the click of a button but im having problems as it just gives me errors when i run it. Here is my code:

Private Sub btnTelnet_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnTelnet.Click

        Dim telnet As Process = New Process
        telnet.StartInfo.FileName = "telnet.exe"
        telnet.StartInfo.Arguments = "o" + txthostname.text
        telnet.StartInfo.WindowStyle = ProcessWindowStyle.Normal
        telnet.StartInfo.CreateNoWindow = True
    End Sub

without the "telnet.StartInfo.Arguments = "o" + txthostname.text" command it just opens telnet but with the code it says "unexpected error continue or quit".

Any help would be great


What does the "o" argument do? I think the problem is to do with this argument, if you want telnet to just connect to a host then just pass the hostname.text as the argument without the "o"

Hope this helps