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

Please support our VB.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Dec 2007
Posts: 10
Reputation: ivabigun is an unknown quantity at this point 
Solved Threads: 0
ivabigun ivabigun is offline Offline
Newbie Poster

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

 
0
  #1
Mar 17th, 2008
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:


  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
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 12
Reputation: kevinwebster83 is an unknown quantity at this point 
Solved Threads: 1
kevinwebster83 kevinwebster83 is offline Offline
Newbie Poster

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

 
0
  #2
Mar 19th, 2008
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
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the VB.NET Forum
Thread Tools Search this Thread



Tag cloud for VB.NET
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC