943,919 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Unsolved
  • Views: 4214
  • VB.NET RSS
Mar 17th, 2008
0

how do i telnet to an ip address from vb.net code

Expand Post »
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:


VB.NET Syntax (Toggle Plain Text)
  1.  
  2. Private Sub btnTelnet_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnTelnet.Click
  3.  
  4. Dim telnet As Process = New Process
  5. telnet.StartInfo.FileName = "telnet.exe"
  6. telnet.StartInfo.Arguments = "o" + txthostname.text
  7. telnet.StartInfo.WindowStyle = ProcessWindowStyle.Normal
  8. telnet.StartInfo.CreateNoWindow = True
  9. telnet.Start()
  10. 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
Cheers
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
ivabigun is offline Offline
10 posts
since Dec 2007
Mar 19th, 2008
0

Re: how do i telnet to an ip address from vb.net code

Hi

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

Kev
Reputation Points: 10
Solved Threads: 1
Newbie Poster
kevinwebster83 is offline Offline
12 posts
since Mar 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in VB.NET Forum Timeline: GDI+ trouble (VB 2005)
Next Thread in VB.NET Forum Timeline: From InputBox to ListBox??





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC